OMNeT++ Simulation Library  5.6.1
Canvas (2D Graphics)

Description

OMNeT++ provides a 2D figure-based drawing API. The central classes are cFigure and cCanvas.

One can create figure objects (derived from cFigure), and place them on a canvas (cCanvas). Every module has its own canvas (cModule::getCanvas()), and one may create additional ones directly.

cFigure contains the following utility classes:

Figures for grouping:

Line figures:

Shape figures:

Text figures:

Image figures:

Classes

struct  cFigure::Point
 Represents a point as (x,y) coordinates. More...
 
struct  cFigure::Rectangle
 Represents a rectangle as an (x,y,width,height) tuple. More...
 
struct  cFigure::Color
 Represents an RGB color. More...
 
struct  cFigure::Font
 Represents properties of a font. More...
 
struct  cFigure::Transform
 Homogeneous 2D transformation matrix. More...
 
struct  cFigure::RGBA
 Represents an RGBA pixel, for Pixmap manipulation. More...
 
class  cFigure::Pixmap
 A rectangular RGBA pixel array. More...
 
class  cFigure
 A lightweight graphical object for cCanvas. More...
 
class  cGroupFigure
 A figure with the sole purpose of grouping its children, and no visual representation. More...
 
class  cPanelFigure
 Sets up an axis-aligned, unscaled coordinate system for children, canceling the effect of any transformation (scaling, rotation, etc.) inherited from ancestor figures. More...
 
class  cAbstractLineFigure
 Common base class for line figures. More...
 
class  cLineFigure
 A figure that displays a straight line segment. More...
 
class  cArcFigure
 A figure that displays an arc. More...
 
class  cPolylineFigure
 A figure that displays a line that consists of multiple connecting straight line segments or of a single smooth curve. More...
 
class  cAbstractShapeFigure
 Abstract base class for various shapes. More...
 
class  cRectangleFigure
 A figure that displays a rectangle, with optionally rounded corners. More...
 
class  cOvalFigure
 A figure that draws a circle or ellipse. More...
 
class  cRingFigure
 A figure that displays a ring, with explicitly controllable inner/outer radii. More...
 
class  cPieSliceFigure
 A figure that displays a pie slice, that is, a section of an axis-aligned disc or filled ellipse. More...
 
class  cPolygonFigure
 A figure that displays a (closed) polygon, determined by a sequence of points. More...
 
class  cPathFigure
 A figure that displays a "path", a complex shape or line modeled after SVG paths. More...
 
class  cAbstractTextFigure
 Abstract base class for figures that display text. Text may be multi-line. More...
 
class  cTextFigure
 A figure that displays text which is affected by zooming and transformations. More...
 
class  cLabelFigure
 A figure that displays text which is unaffected by zooming or transformations, except for its position. More...
 
class  cAbstractImageFigure
 Abstract base class for figures that display an image. More...
 
class  cImageFigure
 A figure that displays an image, typically an icon or a background image, loaded from the OMNeT++ image path. More...
 
class  cIconFigure
 A figure that displays an image, typically an icon or a background image, loaded from the OMNeT++ image path, in a non-zooming way. More...
 
class  cPixmapFigure
 A figure that displays an image that can be manipulated programmatically. More...
 
class  cCanvas
 Provides a scene graph based 2D drawing API for modules. More...
 

Enumerations

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...
 

Enumeration Type Documentation

◆ FontStyle

enum FontStyle

Font style constants: FONT_NONE, FONT_BOLD, etc.

◆ LineStyle

enum LineStyle

Line style constants: LINE_SOLID, LINE_DOTTED, etc.

◆ CapStyle

enum CapStyle

Line cap style constants: CAP_BUTT, CAP_SQUARE, etc.

◆ JoinStyle

enum JoinStyle

Line join style constants: JOIN_BEVEL, JOIN_MITER, etc.

◆ FillRule

enum FillRule

Fill rule constants: FILL_EVENODD, FILL_NONZERO.

◆ Arrowhead

enum Arrowhead

Arrowhead style constants: ARROW_NONE, ARROW_SIMPLE, etc.

◆ Interpolation

Image interpolation mode constants: INTERPOLATION_NONE, INTERPOLATION_FAST, etc.

◆ Anchor

enum Anchor

Anchoring mode constants: ANCHOR_CENTER, ANCHOR_N, etc.