Abstract base class for various shapes.
This class provides line and fill color, line and fill opacity, line style, line width, and other properties for them. Both outline and fill are optional.
When the outline is drawn with a width larger than one pixel, it will be drawn symmetrically, i.e. approximately 50-50% of its width will fall inside and outside the shape.
Transformations such as scaling or skew do affect the width of the line as it is rendered on the canvas. Whether zooming (by the user) should also affect it can be controlled by setting a flag (see setZoomLineWidth()).
The rendering of zero-width lines is currently undefined. It is attempted to be rendered as a one pixel wide line, regardless of transforms and zoom level, but it is not possible on all platform.
|
|
| cAbstractShapeFigure (const char *name=nullptr) |
|
| cAbstractShapeFigure (const cAbstractShapeFigure &other) |
|
cAbstractShapeFigure & | operator= (const cAbstractShapeFigure &other) |
|
|
virtual cAbstractShapeFigure * | dup () const override |
|
virtual std::string | str () const override |
|
virtual void | parse (cProperty *property) override |
|
|
virtual bool | isFilled () const |
|
virtual void | setFilled (bool filled) |
|
virtual bool | isOutlined () const |
|
virtual void | setOutlined (bool outlined) |
|
virtual const Color & | getLineColor () const |
|
virtual void | setLineColor (const Color &lineColor) |
|
virtual const Color & | getFillColor () const |
|
virtual void | setFillColor (const Color &fillColor) |
|
virtual LineStyle | getLineStyle () const |
|
virtual void | setLineStyle (LineStyle lineStyle) |
|
virtual double | getLineWidth () const |
|
virtual void | setLineWidth (double lineWidth) |
|
virtual double | getLineOpacity () const |
|
virtual void | setLineOpacity (double lineOpacity) |
|
virtual double | getFillOpacity () const |
|
virtual void | setFillOpacity (double fillOpacity) |
|
virtual bool | getZoomLineWidth () const |
|
virtual void | setZoomLineWidth (bool zoomLineWidth) |
|
| cFigure (const char *name=nullptr) |
|
| cFigure (const cFigure &other) |
|
virtual | ~cFigure () |
|
cFigure & | operator= (const cFigure &other) |
|
virtual void | forEachChild (cVisitor *v) override |
|
int | getId () const |
|
virtual bool | isVisible () const |
|
virtual void | setVisible (bool visible) |
|
virtual const Transform & | getTransform () const |
|
virtual void | setTransform (const Transform &transform) |
|
virtual void | resetTransform () |
|
virtual double | getZIndex () const |
|
virtual void | setZIndex (double zIndex) |
|
virtual double | getEffectiveZIndex () const |
|
virtual const char * | getTooltip () const |
|
virtual void | setTooltip (const char *tooltip) |
|
virtual cObject * | getAssociatedObject () const |
|
virtual void | setAssociatedObject (cObject *obj) |
|
virtual const char * | getTags () const |
|
virtual void | setTags (const char *tags) |
|
virtual cFigure * | getParentFigure () const |
|
virtual cCanvas * | getCanvas () const |
|
virtual int | getNumFigures () const |
|
virtual cFigure * | getFigure (int pos) const |
|
virtual cFigure * | getFigure (const char *name) const |
|
virtual int | findFigure (const char *name) const |
|
virtual int | findFigure (const cFigure *figure) const |
|
virtual bool | containsFigures () const |
|
virtual cFigure * | findFigureRecursively (const char *name) const |
|
virtual cFigure * | getFigureByPath (const char *path) const |
|
virtual void | addFigure (cFigure *figure) |
|
virtual void | addFigure (cFigure *figure, int pos) |
|
virtual cFigure * | removeFigure (cFigure *figure) |
|
virtual cFigure * | removeFigure (int pos) |
|
virtual cFigure * | removeFromParent () |
|
virtual bool | isAbove (const cFigure *figure) const |
|
virtual bool | isBelow (const cFigure *figure) const |
|
virtual void | insertAbove (cFigure *referenceFigure) |
|
virtual void | insertBelow (cFigure *referenceFigure) |
|
virtual void | insertAfter (const cFigure *referenceFigure) |
|
virtual void | insertBefore (const cFigure *referenceFigure) |
|
virtual void | raiseAbove (cFigure *figure) |
|
virtual void | lowerBelow (cFigure *figure) |
|
virtual void | raiseToTop () |
|
virtual void | lowerToBottom () |
|
virtual cFigure * | dupTree () const |
|
virtual void | translate (double dx, double dy) |
|
virtual void | scale (double s) |
|
virtual void | scale (double sx, double sy) |
|
virtual void | scale (double sx, double sy, double cx, double cy) |
|
virtual void | scale (double sx, double sy, const Point &c) |
|
virtual void | rotate (double phi) |
|
virtual void | rotate (double phi, double cx, double cy) |
|
virtual void | rotate (double phi, const Point &c) |
|
virtual void | skewx (double coeff) |
|
virtual void | skewy (double coeff) |
|
virtual void | skewx (double coeff, double cy) |
|
virtual void | skewy (double coeff, double cx) |
|
virtual void | moveLocal (double dx, double dy)=0 |
|
virtual void | move (double dx, double dy) |
|
virtual void | refreshDisplay () |
|
virtual const char * | getRendererClassName () const =0 |
|
virtual void | updateParentTransform (Transform &transform) |
|
virtual void | callRefreshDisplay () |
|
uint8_t | getLocalChangeFlags () const |
|
uint8_t | getSubtreeChangeFlags () const |
|
void | clearChangeFlags () |
|
void | refreshTagBitsRec (cCanvas *ownerCanvas) |
|
int64_t | getTagBits () const |
|
void | setTagBits (uint64_t tagBits) |
|
uint32_t | getHash () const |
|
void | clearCachedHash () |
|
| cOwnedObject () |
|
| cOwnedObject (const char *name, bool namepooling=true) |
|
| cOwnedObject (const cOwnedObject &obj) |
|
virtual | ~cOwnedObject () |
|
cOwnedObject & | operator= (const cOwnedObject &o) |
|
virtual void | parsimPack (cCommBuffer *buffer) const override |
|
virtual void | parsimUnpack (cCommBuffer *buffer) override |
|
virtual cObject * | getOwner () const override |
|
virtual bool | isOwnedObject () const override |
|
| cNamedObject () |
|
| cNamedObject (const char *name, bool namepooling=true) |
|
| cNamedObject (const cNamedObject &obj) |
|
virtual | ~cNamedObject () |
|
cNamedObject & | operator= (const cNamedObject &o) |
|
virtual void | setName (const char *s) |
|
virtual const char * | getName () const override |
|
virtual void | setNamePooling (bool b) |
|
virtual bool | getNamePooling () |
|
| cObject () |
|
| cObject (const cObject &other)=default |
|
virtual | ~cObject () |
|
virtual const char * | getClassName () const |
|
bool | isName (const char *s) const |
|
virtual const char * | getFullName () const |
|
virtual std::string | getFullPath () const |
|
virtual std::string | getClassAndFullName () const |
|
virtual std::string | getClassAndFullPath () const |
|
const cObject * | getThisPtr () const |
|
virtual std::ostream & | printOn (std::ostream &os) const |
|
virtual bool | isSoftOwner () const |
|
cObject * | findObject (const char *name, bool deep=true) |
|
virtual cClassDescriptor * | getDescriptor () const |
|
void | copyNotSupported () const |
|
|
enum | FontStyle |
| Font style constants: FONT_NONE, FONT_BOLD, etc. More...
|
|
enum | LineStyle |
| Line style constants: LINE_SOLID, LINE_DOTTED, etc. More...
|
|
enum | CapStyle |
| Line cap style constants: CAP_BUTT, CAP_SQUARE, etc. More...
|
|
enum | JoinStyle |
| Line join style constants: JOIN_BEVEL, JOIN_MITER, etc. More...
|
|
enum | FillRule |
| Fill rule constants: FILL_EVENODD, FILL_NONZERO. More...
|
|
enum | Arrowhead |
| Arrowhead style constants: ARROW_NONE, ARROW_SIMPLE, etc. More...
|
|
enum | Interpolation |
| Image interpolation mode constants: INTERPOLATION_NONE, INTERPOLATION_FAST, etc. More...
|
|
enum | Anchor |
| Anchoring mode constants: ANCHOR_CENTER, ANCHOR_N, etc. More...
|
|
enum | Alignment |
| Text alignment mode constants: ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER. More...
|
|
enum | |
|
static Point | parsePoint (const char *s) |
|
static Rectangle | parseRectangle (const char *s) |
|
static Transform | parseTransform (const char *s) |
|
static Font | parseFont (const char *s) |
|
static Color | parseColor (const char *s) |
|
static bool | parseBool (const char *s) |
|
static LineStyle | parseLineStyle (const char *s) |
|
static CapStyle | parseCapStyle (const char *s) |
|
static JoinStyle | parseJoinStyle (const char *s) |
|
static FillRule | parseFillRule (const char *s) |
|
static Arrowhead | parseArrowhead (const char *s) |
|
static Interpolation | parseInterpolation (const char *s) |
|
static Anchor | parseAnchor (const char *s) |
|
static Alignment | parseAlignment (const char *s) |
|
static long | getTotalObjectCount () |
|
static long | getLiveObjectCount () |
|
static void | resetObjectCounters () |
|
static cSoftOwner * | getOwningContext () |
|
static const Color | BLACK |
|
static const Color | WHITE |
|
static const Color | GREY |
|
static const Color | RED |
|
static const Color | GREEN |
|
static const Color | BLUE |
|
static const Color | YELLOW |
|
static const Color | CYAN |
|
static const Color | MAGENTA |
|
static const int | NUM_GOOD_DARK_COLORS |
|
static const int | NUM_GOOD_LIGHT_COLORS |
|
static const Color | GOOD_DARK_COLORS [14] |
|
static const Color | GOOD_LIGHT_COLORS [10] |
|
static Point | parsePoint (cProperty *property, const char *key, int index) |
|
static std::vector< Point > | parsePoints (cProperty *property, const char *key) |
|
static Rectangle | parseBounds (cProperty *property, const Rectangle &defaults) |
|
static Transform | parseTransform (cProperty *property, const char *key) |
|
static Font | parseFont (cProperty *property, const char *key) |
|
static Rectangle | computeBoundingBox (const Point &position, const Point &size, double ascent, Anchor anchor) |
|
static void | concatArrays (const char **dest, const char **first, const char **second) |
|