Frame Class Reference

#include <Frame.hpp>

List of all members.


Detailed Description

This class defines a frame that can be drawn in.

A frame is positioned somewhere on a VGImage, the frame automatically does translation of things drawn in it to page space. (Currently does not scale)

Examples:

example11.cpp, and example13.cpp.

Definition at line 45 of file Frame.hpp.

Public Member Functions

 Frame (void)
 Default constructor. Creates an unusable frame. Needed for containers.
 Frame (VGImage &target)
 Constructor. Create a top level frame from a VGImage.
 ~Frame ()
void setWidth (double newWidth)
void setHeight (double newHeight)
double getWidth (void) const
double getHeight (void) const
void comment (const Comment &comment)
void line (const Line &line)
void rectangle (const Rectangle &rect)
void circle (const Circle &circle)
void text (const Text &text)
void polygon (const Polygon &polygon)
void bitmap (const Bitmap &bitmap)
void nest (const Frame &parent, double xoffset, double yoffset)
 Nests this frame within the parent by the given amounts.
double cx (void) const
 Returns x coordinate of center of frame in frame coordinates.
double cy (void) const
 Returns y coordinate of center of frame in frame coordinates.
double lx (void) const
 Returns x coordinate of the left edge of the frame in frame coordinates.
double ux (void) const
 Returns x coordinate of the right edge of the frame in frame coordinates.
double uy (void) const
 Returns y coordinate of the upper edge of the frame in frame coordinates.
double ly (void) const
 Returns y coordinate of the lower edge of the frame in frame coordinates.
bool isLL ()
double actualX (void) const
 Returns x coordinate of the left edge of the frame in image coordinates.
double actualY (void) const
 Returns y coordinate of the lower edge of the frame in image coordinates.

Protected Member Functions

void fixMarker (Markable *m)
 If m has no Marker and the default is set, set m's Marker to default.
void fixStrokeStyle (BasicShape *s)
 If s has no StrokeStyle and the default is set, set s's StrokeStyle to default.
void fixFillColor (Fillable *f)
 If f has no fill Color and the default is set, set f's fill Color to default.
void fixTextStyle (Text *t)
 If t has no TextStyle and the default is set, set t's TextStyle to default.

Protected Attributes

bool isTopLevel
 If this frame's parent is the VGImage, not another frame or a layout.
double originX
 X value of the origin of this frame.
double originY
 Y value of the origin of this frame.
double width
 Width of this frame.
double height
 Height of this frame.
bool valid
 If this frame is valid and can be drawn in.
VGImage * display
 The VGImage in which to draw.


Constructor & Destructor Documentation

Frame void   )  [inline]
 

Default constructor. Creates an unusable frame. Needed for containers.

Definition at line 50 of file Frame.hpp.

References display, and valid.

Frame VGImage &  target  ) 
 

Constructor. Create a top level frame from a VGImage.

~Frame  )  [inline]
 

Definition at line 58 of file Frame.hpp.


Member Function Documentation

double actualX void   )  const [inline]
 

Returns x coordinate of the left edge of the frame in image coordinates.

Definition at line 125 of file Frame.hpp.

double actualY void   )  const [inline]
 

Returns y coordinate of the lower edge of the frame in image coordinates.

Definition at line 127 of file Frame.hpp.

void bitmap const Bitmap bitmap  ) 
 

void circle const Circle circle  ) 
 

void comment const Comment comment  ) 
 

double cx void   )  const [inline]
 

Returns x coordinate of center of frame in frame coordinates.

Examples:
example11.cpp, and example13.cpp.

Definition at line 110 of file Frame.hpp.

References width.

double cy void   )  const [inline]
 

Returns y coordinate of center of frame in frame coordinates.

Examples:
example11.cpp, and example13.cpp.

Definition at line 112 of file Frame.hpp.

References height.

void fixFillColor Fillable f  )  [protected]
 

If f has no fill Color and the default is set, set f's fill Color to default.

void fixMarker Markable m  )  [protected]
 

If m has no Marker and the default is set, set m's Marker to default.

void fixStrokeStyle BasicShape s  )  [protected]
 

If s has no StrokeStyle and the default is set, set s's StrokeStyle to default.

void fixTextStyle Text t  )  [protected]
 

If t has no TextStyle and the default is set, set t's TextStyle to default.

double getHeight void   )  const [inline]
 

Returns:
Height of the frame.

Definition at line 78 of file Frame.hpp.

Referenced by SeriesList::drawInFrame().

double getWidth void   )  const [inline]
 

Returns:
Width of the frame.

Definition at line 73 of file Frame.hpp.

Referenced by SeriesList::drawInFrame().

bool isLL  )  [inline]
 

Definition at line 122 of file Frame.hpp.

References display.

void line const Line line  ) 
 

Referenced by SeriesList::drawInFrame().

double lx void   )  const [inline]
 

Returns x coordinate of the left edge of the frame in frame coordinates.

Definition at line 114 of file Frame.hpp.

Referenced by SeriesList::drawInFrame().

double ly void   )  const [inline]
 

Returns y coordinate of the lower edge of the frame in frame coordinates.

Definition at line 120 of file Frame.hpp.

Referenced by SeriesList::drawInFrame().

void nest const Frame parent,
double  xoffset,
double  yoffset
 

Nests this frame within the parent by the given amounts.

Parameters:
parent Frame in which to nest this frame.
xoffset X offset to decrease on either side of the frame.
yoffset Y offset to decrease on top and bottom of the frame.

void polygon const Polygon polygon  ) 
 

void rectangle const Rectangle rect  ) 
 

void setHeight double  newHeight  )  [inline]
 

Parameters:
newHeight new height for the frame.

Definition at line 68 of file Frame.hpp.

References height.

void setWidth double  newWidth  )  [inline]
 

Parameters:
newWidth new width for the frame.

Definition at line 63 of file Frame.hpp.

References width.

void text const Text text  ) 
 

double ux void   )  const [inline]
 

Returns x coordinate of the right edge of the frame in frame coordinates.

Definition at line 116 of file Frame.hpp.

double uy void   )  const [inline]
 

Returns y coordinate of the upper edge of the frame in frame coordinates.

Definition at line 118 of file Frame.hpp.


Member Data Documentation

VGImage* display [protected]
 

The VGImage in which to draw.

Definition at line 143 of file Frame.hpp.

Referenced by Frame(), and isLL().

double height [protected]
 

Height of this frame.

Definition at line 139 of file Frame.hpp.

Referenced by cy(), and setHeight().

bool isTopLevel [protected]
 

If this frame's parent is the VGImage, not another frame or a layout.

Definition at line 131 of file Frame.hpp.

double originX [protected]
 

X value of the origin of this frame.

Definition at line 133 of file Frame.hpp.

double originY [protected]
 

Y value of the origin of this frame.

Definition at line 135 of file Frame.hpp.

bool valid [protected]
 

If this frame is valid and can be drawn in.

Definition at line 141 of file Frame.hpp.

Referenced by Frame().

double width [protected]
 

Width of this frame.

Definition at line 137 of file Frame.hpp.

Referenced by cx(), and setWidth().


The documentation for this class was generated from the following file:
Generated on Fri May 24 03:31:35 2013 for GPS ToolKit Software Library by  doxygen 1.3.9.1