32 #include <initializer_list> 85 virtual bool contains(
double x,
double y)
const;
97 virtual void draw(QPainter* painter) = 0;
210 virtual string
getType()
const = 0;
221 virtual double getX()
const;
226 virtual double getY()
const;
256 virtual void move(
double dx,
double dy);
275 virtual void rotate(
double theta);
285 virtual void scale(
double sf);
296 virtual void scale(
double sx,
double sy);
336 virtual void setBounds(
double x,
double y,
double width,
double height);
393 virtual void setColor(
int r,
int g,
int b);
413 virtual void setColor(
const string& color);
457 virtual void setFont(
const QFont& font);
472 virtual void setFont(
const string& font);
546 virtual void setSize(
double width,
double height);
563 virtual void setWidth(
double width);
568 virtual void setX(
double x);
573 virtual void setY(
double y);
593 static bool _sAntiAliasing;
622 GObject(
double x = 0,
double y = 0,
double width = 0,
double height = 0);
629 virtual void initializeBrushAndPen(QPainter* painter =
nullptr);
635 static Qt::PenStyle toQtPenStyle(
LineStyle lineStyle);
678 GArc(
double width = 0,
double height = 0,
double start = 0,
double sweep = 0);
685 GArc(
double x,
double y,
double width,
double height,
double start,
double sweep);
688 bool contains(
double x,
double y)
const override;
694 void draw(QPainter* painter)
override;
725 string
getType()
const override;
751 virtual bool containsAngle(
double theta)
const;
752 virtual GPoint getArcPoint(
double theta)
const;
787 virtual void add(
GObject* gobj,
double x,
double y);
800 virtual void add(
GObject& gobj,
double x,
double y);
806 virtual void clear();
827 bool contains(
double x,
double y)
const override;
833 void draw(QPainter* painter)
override;
857 string
getType()
const override;
867 virtual QWidget* getWidget()
const;
884 virtual void remove(
GObject* gobj);
889 virtual void remove(
GObject& gobj);
906 virtual void repaintRegion(
int x,
int y,
int width,
int height);
928 virtual void setWidget(QWidget* widget);
939 virtual int findGObject(
GObject* gobj)
const;
940 virtual void removeAt(
int index);
943 std::vector<GObject*> _contents;
944 QWidget* _widget =
nullptr;
963 GImage(
const string& filename =
"",
double x = 0,
double y = 0);
973 GImage(std::istream& source,
double x = 0,
double y = 0);
979 GImage(
double width,
double height);
992 void draw(QPainter* painter)
override;
1004 virtual int getPixel(
int x,
int y)
const;
1007 string
getType()
const override;
1014 virtual void setPixel(
int x,
int y,
int rgb);
1036 bool load(
const string& filename);
1042 bool loadFromStream(std::istream& input);
1072 bool contains(
double x,
double y)
const override;
1078 void draw(QPainter* painter)
override;
1091 virtual double getEndX()
const;
1096 virtual double getEndY()
const;
1120 string
getType()
const override;
1145 virtual void setPoints(
double x0,
double y0,
double x1,
double y1);
1189 GOval(
double x = 0,
double y = 0,
double width = 0,
double height = 0);
1192 bool contains(
double x,
double y)
const override;
1198 void draw(QPainter* painter)
override;
1201 string
getType()
const override;
1221 GPolygon(std::initializer_list<double> coords);
1222 GPolygon(std::initializer_list<GPoint> points);
1228 virtual void addEdge(
double dx,
double dy);
1240 virtual void addEdges(std::initializer_list<double> coords);
1246 virtual void addEdges(std::initializer_list<GPoint> points);
1260 virtual void addVertex(
double x,
double y);
1273 virtual void addVertexes(std::initializer_list<double> coords);
1280 virtual void addVertexes(std::initializer_list<GPoint> points);
1285 virtual void clear();
1288 bool contains(
double x,
double y)
const override;
1294 void draw(QPainter* painter)
override;
1303 string
getType()
const override;
1336 QVector<QPointF> _vertices;
1352 GRect(
double x = 0,
double y = 0,
double width = 0,
double height = 0);
1358 void draw(QPainter* painter)
override;
1361 string
getType()
const override;
1393 bool contains(
double x,
double y)
const override;
1399 void draw(QPainter* painter)
override;
1408 string
getType()
const override;
1455 GText(
const string& str =
"",
double x = 0,
double y = 0);
1461 void draw(QPainter* painter)
override;
1469 virtual string
getFont()
const;
1493 virtual string
getText()
const;
1496 string
getType()
const override;
1499 void setFont(
const QFont& font)
override;
1502 void setFont(
const string& font)
override;
1509 virtual void setLabel(
const string& str);
1516 virtual void setText(
const string& str);
1533 std::ostream& operator <<(std::ostream& out,
const GObject& obj);
1535 #endif // _gobjects_h virtual double getSweepAngle() const
Returns the sweep angle for this arc in degrees.
Definition: gobjects.cpp:671
virtual LineStyle getLineStyle() const
Returns the object's style such as solid or dashed.
Definition: gobjects.cpp:152
virtual void setBounds(double x, double y, double width, double height)
Changes the bounds of this object to the specified values.
Definition: gobjects.cpp:344
virtual double getHeight() const
Returns the height of this object, which is the same as the height of its bounding box...
Definition: gobjects.cpp:148
bool contains(double x, double y) const override
Returns true if the specified point is inside the object.
Definition: gobjects.cpp:1262
virtual void setColor(int r, int g, int b)
Sets the color used to display this object.
Definition: gobjects.cpp:372
string toString() const override
Returns a printable representation of the object.
Definition: gobjects.cpp:984
virtual GRectangle getBounds() const
Returns the bounding box of this object, which is defined to be the smallest rectangle that covers ev...
Definition: gobjects.cpp:119
This struct contains real-valued width and height fields.
Definition: gtypes.h:39
virtual GCompound * getParent() const
Returns a pointer to the GCompound that contains this object.
Definition: gobjects.cpp:168
virtual double getRightX() const
Returns the x-coordinate of the right side of the object.
Definition: gobjects.cpp:172
Definition: gobjects.h:71
virtual string toString() const
Returns a printable representation of the object.
Definition: gobjects.cpp:506
LineStyle _lineStyle
Definition: gobjects.h:603
virtual void add(GObject *gobj)
Adds a new graphical object to the compound, if that object was not already present in the compound...
Definition: gobjects.cpp:709
virtual void setRightX(double x)
Sets the location of the rightmost x-coordinate of this object.
Definition: gobjects.cpp:332
static const double DEFAULT_CORNER
The default diameter of corners on rounded rectangles if none is supplied to the constructor.
Definition: gobjects.h:1374
virtual void setCorner(double corner)
Sets the diameter of the arc forming the corner of this rounded rectangle.
Definition: gobjects.cpp:1553
void repaint() override
Instructs the compound to redraw all of its graphical objects.
Definition: gobjects.cpp:886
virtual double getCorner() const
Returns the diameter of the arc forming the corner of this rounded rectangle.
Definition: gobjects.cpp:1545
virtual void setX(double x)
Sets the x location of the left side of this object.
Definition: gobjects.cpp:498
virtual void setEndPoint(double x1, double y1)
Sets the end point in the line to (x1, y1), leaving the start point unchanged.
Definition: gobjects.cpp:1222
string toStringExtra() const override
Returns a string containing any extra unique information about this type of graphical object...
Definition: gobjects.cpp:1109
virtual void setBottomY(double y)
Sets the location of the bottom y-coordinate of this object.
Definition: gobjects.cpp:328
A GCanvas is a graphical drawing surface on which you can draw shapes, lines, and colors...
Definition: gcanvas.h:70
This graphical object subclass represents an oval inscribed in a rectangular box. ...
Definition: gobjects.h:1182
virtual double getX() const
Returns the leftmost x-coordinate of the object.
Definition: gobjects.cpp:185
virtual void setPoints(double x0, double y0, double x1, double y1)
Sets this line's two end points to (x0, y0) and (x1, y1).
Definition: gobjects.cpp:1230
virtual void removeAll()
Removes all graphical objects from the compound.
Definition: gobjects.cpp:862
virtual string getFileName() const
Returns the file name used to load the image, as was passed to the constructor.
Definition: gobjects.cpp:1088
virtual void addVertexes(std::initializer_list< double > coords)
Adds multiple edges to the polygon whose components are given by the coordinates dx and dy relative t...
Definition: gobjects.cpp:1346
void setFont(const QFont &font) override
Changes the font used to display the object as specified by the given Qt font.
Definition: gobjects.cpp:1613
virtual string getFillColor() const
Returns the color used to display the filled region of this object.
Definition: gobjects.cpp:144
virtual GObject * getElementAt(double x, double y) const
Returns a pointer to the first graphical object that contains the given (x, y) point, or a null pointer if no object in this compound touches it.
Definition: gobjects.cpp:821
virtual GPoint getVertex(int i) const
Returns the vertex at the given 0-based index in this polygon.
Definition: gobjects.cpp:1436
QImage * getQImage() const
Returns the inner Qt QImage object being wrapped.
Definition: gobjects.cpp:1097
string getType() const override
Returns the type of the object as a string, such as "GOval" or "GRect".
Definition: gobjects.cpp:1484
virtual double getEndY() const
Returns the y-coordinate of the point at which the line ends.
Definition: gobjects.cpp:1194
virtual string getText() const
Returns the string displayed by this object.
Definition: gobjects.cpp:1605
double _y
Definition: gobjects.h:598
virtual double getCenterY() const
Returns the y-coordinate of the center of the object.
Definition: gobjects.cpp:136
GRectangle getBounds() const override
Returns the bounding box of this object, which is defined to be the smallest rectangle that covers ev...
Definition: gobjects.cpp:797
virtual void move(double dx, double dy)
Moves the object on the screen using the displacements dx and dy.
Definition: gobjects.cpp:259
static void setAntiAliasing(bool value)
Globally turns on/off the anti-aliasing feature that smooths out the edges of onscreen shapes...
Definition: gobjects.cpp:324
double getHeight() const override
Returns the height of this object, which is the same as the height of its bounding box...
Definition: gobjects.cpp:1198
virtual void setWidth(double width)
Changes the width of this object to the specified width without changing its height.
Definition: gobjects.cpp:494
This graphical object subclass represents an image from a file.
Definition: gobjects.h:953
virtual bool isFilled() const
Returns true if the object is filled with color.
Definition: gobjects.cpp:247
virtual void addPolarEdge(double r, double theta)
Adds an edge to the polygon specified in polar coordinates.
Definition: gobjects.cpp:1331
QBrush _brush
Definition: gobjects.h:614
double _opacity
Definition: gobjects.h:602
virtual void rotate(double theta)
Transforms the object by rotating it theta degrees counterclockwise around its origin.
Definition: gobjects.cpp:280
string getType() const override
Returns the type of the object as a string, such as "GOval" or "GRect".
Definition: gobjects.cpp:1609
GArc(double width=0, double height=0, double start=0, double sweep=0)
Creates a new GArc object consisting of an elliptical arc.
Definition: gobjects.cpp:546
virtual string getColor() const
Returns the color used to display this object.
Definition: gobjects.cpp:140
double getWidth() const override
Returns the width of this object, which is equal to the width of the bounding box.
Definition: gobjects.cpp:1452
virtual void setFont(const QFont &font)
Changes the font used to display the object as specified by the given Qt font.
Definition: gobjects.cpp:425
string getType() const override
Returns the type of the object as a string, such as "GOval" or "GRect".
Definition: gobjects.cpp:834
GRectangle getBounds() const override
Returns the bounding box of this object, which is defined to be the smallest rectangle that covers ev...
Definition: gobjects.cpp:623
virtual void setFrameRectangle(const GRectangle &rect)
Changes the boundaries of the rectangle used to frame the arc.
Definition: gobjects.cpp:683
virtual void setHeight(double height)
Changes the height of this object to the specified height without changing its width.
Definition: gobjects.cpp:446
virtual void conditionalRepaintRegion(int x, int y, int width, int height)
Repaints the given rectangular region of the compound only if it needs to be repainted (if any of its...
Definition: gobjects.cpp:749
double _width
Definition: gobjects.h:599
virtual void setOpacity(double opacity)
Sets how opaque (non-transparent) this object will appear from 0.0 (completely transparent) to 1...
Definition: gobjects.cpp:470
Definition: gobjects.h:72
virtual void setSweepAngle(double start)
Sets the sweep angle for this arc in degrees.
Definition: gobjects.cpp:692
virtual string getLabel() const
Returns the string displayed by this object.
Definition: gobjects.cpp:1601
virtual void setCenterY(double y)
Sets the y-coordinate of the center of this object.
Definition: gobjects.cpp:360
double _height
Definition: gobjects.h:600
bool contains(double x, double y) const override
Returns true if the specified point is inside the object.
Definition: gobjects.cpp:1129
virtual double getCenterX() const
Returns the x-coordinate of the center of the object.
Definition: gobjects.cpp:132
virtual void setForeground(int r, int g, int b)
Sets the color used to display this object.
Definition: gobjects.cpp:434
virtual double getBottomY() const
Returns the y-coordinate of the bottom of the object.
Definition: gobjects.cpp:115
string toStringExtra() const override
Returns a string containing any extra unique information about this type of graphical object...
Definition: gobjects.cpp:1633
QTransform _transform
Definition: gobjects.h:615
A GRoundRect represents a graphical object whose appearance consists of a rectangular box with rounde...
Definition: gobjects.h:1368
static const string DEFAULT_FONT
The default font used in text labels if none is provided.
Definition: gobjects.h:1447
GPolygon()
Constructs a new empty polygon at the origin.
Definition: gobjects.cpp:1290
virtual bool contains(double x, double y) const
Returns true if the specified point is inside the object.
Definition: gobjects.cpp:98
Definition: gobjects.h:69
double _dy
Definition: gobjects.h:1175
virtual double getStartX() const
Returns the x-coordinate of the point at which the line starts.
Definition: gobjects.cpp:1206
virtual std::vector< GPoint > getVertices() const
Returns a vector of the points in the polygon.
Definition: gobjects.cpp:1444
virtual bool isAutoRepaint() const
Returns whether the compound automatically repaints itself when its contents change.
Definition: gobjects.cpp:842
GOval(double x=0, double y=0, double width=0, double height=0)
Constructs a new oval inscribed in the specified rectangle.
Definition: gobjects.cpp:1257
GImage(string filename="", double x=0, double y=0)
Constructs a new image by loading the image from the specified file.
Definition: gobjects.cpp:989
GRectangle getBounds() const override
Returns the bounding box of this object, which is defined to be the smallest rectangle that covers ev...
Definition: gobjects.cpp:1176
virtual void clear()
Removes all vertexes from the polygon.
Definition: gobjects.cpp:1367
virtual void setVisible(bool flag)
Sets whether this object is visible.
Definition: gobjects.cpp:489
virtual void addEdges(std::initializer_list< double > coords)
Adds multiple edges to the polygon whose components are given by the displacements dx and dy from the...
Definition: gobjects.cpp:1310
virtual double getStartAngle() const
Returns the starting angle for this arc in degrees.
Definition: gobjects.cpp:663
This graphical object subclass represents a text string.
Definition: gobjects.h:1442
virtual GDimension getSize() const
Returns the size of the object as a GDimension.
Definition: gobjects.cpp:176
virtual void setBottomRightLocation(double x, double y)
Sets the location of the bottom/right of this object.
Definition: gobjects.cpp:336
virtual void setCenterLocation(double x, double y)
Sets the location of the center of this object.
Definition: gobjects.cpp:364
virtual void setLocation(double x, double y)
Sets the location of the top-left corner of this object to the specified coordinates.
Definition: gobjects.cpp:460
virtual string getFont() const
Returns the current font for the label.
Definition: gobjects.cpp:1587
virtual void scale(double sf)
Scales the object by the specified scale factor.
Definition: gobjects.cpp:286
virtual void repaintRegion(int x, int y, int width, int height)
Instructs the compound to redraw the given rectangular region within itself, including any graphical ...
Definition: gobjects.cpp:901
virtual void setLabel(string str)
Changes the string stored within the text label, so that a new text string appears on the display...
Definition: gobjects.cpp:1623
virtual double getFontAscent() const
Returns the maximum distance strings in this font extend above the baseline.
Definition: gobjects.cpp:1591
virtual int getVertexCount() const
Returns the number of vertexes in this polygon.
Definition: gobjects.cpp:1440
virtual void setStartAngle(double start)
Sets the starting angle for this arc in degrees.
Definition: gobjects.cpp:687
virtual GPoint getEndPoint() const
Returns the point at which the arc ends.
Definition: gobjects.cpp:655
virtual GPoint getBottomRightLocation() const
Returns the x/y coordinates of the bottom/right corner of the object.
Definition: gobjects.cpp:111
GRect(double x=0, double y=0, double width=0, double height=0)
Constructs a rectangle with the specified width and height.
Definition: gobjects.cpp:1469
virtual ~GObject()
Frees the storage for the object.
Definition: gobjects.cpp:94
bool contains(double x, double y) const override
Returns true if the specified point is inside the object.
Definition: gobjects.cpp:1507
virtual void setFilled(bool flag)
Sets the fill status for the object, where false is outlined and true is filled.
Definition: gobjects.cpp:420
void sendForward()
Moves this object one step toward the front in the z dimension.
Definition: gobjects.cpp:303
virtual void setSize(double width, double height)
Changes the size of this object to the specified width and height.
Definition: gobjects.cpp:476
virtual double getStartY() const
Returns the y-coordinate of the point at which the line starts.
Definition: gobjects.cpp:1210
string getType() const override
Returns the type of the object as a string, such as "GOval" or "GRect".
Definition: gobjects.cpp:675
int _colorInt
Definition: gobjects.h:605
double _x
Definition: gobjects.h:597
string _fillColor
Definition: gobjects.h:606
This abstract class is the superclass for all graphical interactors.
Definition: ginteractor.h:48
GCompound * _parent
Definition: gobjects.h:612
string getType() const override
Returns the type of the object as a string, such as "GOval" or "GRect".
Definition: gobjects.cpp:1549
bool contains(double x, double y) const override
Returns true if the specified point is inside the object.
Definition: gobjects.cpp:560
virtual void setY(double y)
Sets the y location of the top of this object.
Definition: gobjects.cpp:502
virtual GPoint getStartPoint() const
Returns the point at which the line starts.
Definition: gobjects.cpp:1202
virtual GPoint getStartPoint() const
Returns the point at which the arc starts.
Definition: gobjects.cpp:667
virtual void setFillColor(int r, int g, int b)
Sets the color used to display the filled region of this object, if any.
Definition: gobjects.cpp:394
string toStringExtra() const override
Returns a string containing any extra unique information about this type of graphical object...
Definition: gobjects.cpp:697
virtual ~GImage()
Frees memory allocated internally by the image.
Definition: gobjects.cpp:1023
double _corner
Definition: gobjects.h:1420
static bool isAntiAliasing()
Returns whether we should globally anti-alias graphical objects.
Definition: gobjects.cpp:243
virtual void setVertex(int i, GPoint point)
Sets the vertex at the given 0-based index in this polygon to the given coordinates.
Definition: gobjects.cpp:1456
This class is the common superclass of all graphical objects that can be displayed on a graphical win...
Definition: gobjects.h:62
virtual void setText(string str)
Changes the string stored within the text label, so that a new text string appears on the display...
Definition: gobjects.cpp:1629
virtual void setPixel(int x, int y, int rgb)
Sets the pixel at the given x/y location to the given color, represented as an RGB integer...
Definition: gobjects.cpp:1105
string getType() const override
Returns the type of the object as a string, such as "GOval" or "GRect".
Definition: gobjects.cpp:1214
A GRect is a graphical object whose appearance consists of a rectangular box.
Definition: gobjects.h:1345
virtual string toStringExtra() const
Returns a string containing any extra unique information about this type of graphical object...
Definition: gobjects.cpp:541
virtual void setLineWidth(double lineWidth)
Sets the width of the line used to draw this object.
Definition: gobjects.cpp:455
virtual string getType() const =0
Returns the type of the object as a string, such as "GOval" or "GRect".
Definition: gobjects.h:70
This graphical object subclass consists of a collection of other graphical objects.
Definition: gobjects.h:765
Definition: gobjects.h:73
GText(string str="", double x=0, double y=0)
Creates a GText object containing the specified string.
Definition: gobjects.cpp:1564
double getWidth() const override
Returns the width of this object, which is equal to the width of the bounding box.
Definition: gobjects.cpp:1218
bool _visible
Definition: gobjects.h:610
virtual int getPixel(int x, int y) const
Returns the color of the pixel at the given x/y location as an RGB integer.
Definition: gobjects.cpp:1092
virtual int getElementCount() const
Returns the number of graphical objects stored in the compound.
Definition: gobjects.cpp:830
virtual GPoint getLocation() const
Returns the location of the top-left corner of object.
Definition: gobjects.cpp:160
LineStyle
Styles that can be used for the outline around various shapes.
Definition: gobjects.h:68
double _lineWidth
Definition: gobjects.h:601
string toStringExtra() const override
Returns a string containing any extra unique information about this type of graphical object...
Definition: gobjects.cpp:1462
string getType() const override
Returns the type of the object as a string, such as "GOval" or "GRect".
Definition: gobjects.cpp:1285
string _font
Definition: gobjects.h:608
QPen _pen
Definition: gobjects.h:613
virtual double getY() const
Returns the topmost y-coordinate of the object.
Definition: gobjects.cpp:189
void sendToFront()
Moves this object to the front of the display in the z dimension.
Definition: gobjects.cpp:317
string toStringExtra() const override
Returns a string containing any extra unique information about this type of graphical object...
Definition: gobjects.cpp:1559
string _color
Definition: gobjects.h:604
virtual void clear()
Removes all graphical objects from the compound.
Definition: gobjects.cpp:739
virtual void repaint()
Instructs the object to redraw itself on screen.
Definition: gobjects.cpp:263
virtual GObject * getElement(int index) const
Returns a pointer to the graphical object at the specified index, numbering from back to front in the...
Definition: gobjects.cpp:817
virtual bool isEmpty() const
Returns true if the compound does not contain any graphical objects.
Definition: gobjects.cpp:846
virtual bool isTransformed() const
Returns true if this object has been transformed by calling methods such as rotate() or scale() on it...
Definition: gobjects.cpp:251
bool contains(double x, double y) const override
Returns true if the specified point is inside the object.
Definition: gobjects.cpp:1372
friend class GDiffImage
Definition: gobjects.h:1048
bool contains(double x, double y) const override
Returns true if the specified point is inside the object.
Definition: gobjects.cpp:761
virtual double getEndX() const
Returns the x-coordinate of the point at which the line ends.
Definition: gobjects.cpp:1190
virtual void setAutoRepaint(bool autoRepaint)
Sets whether the compound automatically repaints itself when its contents change. ...
Definition: gobjects.cpp:976
double _dx
Definition: gobjects.h:1174
GRoundRect(double width=0, double height=0, double corner=DEFAULT_CORNER)
Constructs a new rectangle with the specified width and height, located at (0, 0).
Definition: gobjects.cpp:1495
virtual double getOpacity() const
Returns how opaque (non-transparent) this object will appear from 0.0 (completely transparent) to 1...
Definition: gobjects.cpp:164
virtual void addVertex(double x, double y)
Adds a vertex at (x, y) relative to the polygon origin.
Definition: gobjects.cpp:1335
int _fillColorInt
Definition: gobjects.h:607
void sendToBack()
Moves this object to the back of the display in the z dimension.
Definition: gobjects.cpp:310
bool _transformed
Definition: gobjects.h:611
virtual double getLineWidth() const
Returns the width of the line used to draw this object.
Definition: gobjects.cpp:156
virtual bool isVisible() const
Returns true if this object is visible on screen.
Definition: gobjects.cpp:255
This struct contains real-valued x, y, width, and height fields.
Definition: gtypes.h:289
string getType() const override
Returns the type of the object as a string, such as "GOval" or "GRect".
Definition: gobjects.cpp:1101
Definition: gobjects.h:74
GCompound()
Creates a compound with no internal components.
Definition: gobjects.cpp:704
GRectangle getBounds() const override
Returns the bounding box of this object, which is defined to be the smallest rectangle that covers ev...
Definition: gobjects.cpp:1579
virtual double getWidth() const
Returns the width of this object, which is equal to the width of the bounding box.
Definition: gobjects.cpp:181
string toStringExtra() const override
Returns a string containing any extra unique information about this type of graphical object...
Definition: gobjects.cpp:1250
string getType() const override
Returns the type of the object as a string, such as "GOval" or "GRect".
Definition: gobjects.cpp:1432
virtual GPoint getEndPoint() const
Returns the point at which the line ends.
Definition: gobjects.cpp:1186
virtual GPoint getCenterLocation() const
Returns the x/y-coordinates of the center of the object.
Definition: gobjects.cpp:128
virtual void addEdge(double dx, double dy)
Adds an edge to the polygon whose components are given by the displacements dx and dy from the last v...
Definition: gobjects.cpp:1302
virtual void resetTransform()
Undoes any previous scale/rotate transformations on this object.
Definition: gobjects.cpp:274
void sendBackward()
Moves this object one step toward the back in the z dimension.
Definition: gobjects.cpp:296
virtual GRectangle getFrameRectangle() const
Returns the boundaries of the rectangle used to frame the arc.
Definition: gobjects.cpp:659
double getHeight() const override
Returns the height of this object, which is the same as the height of its bounding box...
Definition: gobjects.cpp:1428
virtual void setCenterX(double x)
Sets the x-coordinate of the center of this object.
Definition: gobjects.cpp:356
This struct contains real-valued x and y fields.
Definition: gtypes.h:198
virtual void setStartPoint(double x0, double y0)
Sets the initial point in the line to (x0, y0), leaving the end point unchanged.
Definition: gobjects.cpp:1242
This graphical object subclass represents a line segment.
Definition: gobjects.h:1054
This graphical object subclass represents a polygon bounded by line segments.
Definition: gobjects.h:1211
This graphical object subclass represents an elliptical arc.
Definition: gobjects.h:672
GLine(double x0=0, double y0=0, double x1=0, double y1=0, LineStyle lineStyle=LINE_SOLID)
Constructs a line segment from its endpoints.
Definition: gobjects.cpp:1114
bool _fillFlag
Definition: gobjects.h:609
virtual void setLineStyle(LineStyle lineStyle)
Sets the object's style such as solid (GObject::LINE_SOLID) or dashed (GObject::LINE_DASH).
Definition: gobjects.cpp:450
virtual void conditionalRepaint()
Repaints the compound only if it needs to be repainted (if any of its contents have changed)...
Definition: gobjects.cpp:743
GRectangle getBounds() const override
Returns the bounding box of this object, which is defined to be the smallest rectangle that covers ev...
Definition: gobjects.cpp:1407
virtual double getFontDescent() const
Returns the maximum distance strings in this font descend below the baseline.
Definition: gobjects.cpp:1596