|
Jameo Core Library
|
This class provides the parent class for the graphic output. This class draws. More...
Public Member Functions | |
| PaintingBackend () | |
| Constructor. | |
| ~PaintingBackend () override | |
| Destructor. | |
| void | cancelProcess (bool status) |
| This method is called to interrupt the work of the drawing thread as soon as possible. | |
| void | pushTransform (const Matrix &t) |
| This method pushes a new transformation onto the transformation stack. | |
| void | popTransform () |
| This method removes the top element from the transformation stack. | |
| virtual void | setColor (Color color)=0 |
| This method changes the color used for drawing on the target context. | |
| virtual Color | color () const =0 |
| Returns the current color used for drawing on the target context. | |
| virtual void | setLineWeight (double lineweight)=0 |
| This method sets the line weight used for drawing the objects. | |
| virtual double | lineWeight () const =0 |
| void | moveTo (const Vertex3 &pt) |
| This method moves the pen from the current position to the new position, without drawing anything. | |
| void | blindTo (const Vertex3 &pt) |
| This method "draws" an invisible line to the new point. This is necessary because, for example, in hatching, the line pattern depends on the position and lines may be interrupted. Here, only the offset in the line pattern is changed. | |
| void | lineTo (const Vertex3 &pt) |
| This method moves the pen from the current position to the new position, and draws a straight line in the process. | |
| void | stroke () |
| This method closes the current path, draws it, and implicitly opens a new path. | |
| virtual void | fill ()=0 |
| This method closes the current path, fills the enclosed area with the current color, and implicitly opens a new path. | |
| virtual void | fillAndStroke ()=0 |
| This method closes the current path, fills the enclosed area with the current color, draws it, and implicitly opens a new path. | |
| void | arc (const Vertex3 ¢er, const Vertex3 &normal, double radius, double startAngle, double endAngle) |
| This method is used to add the graphics primitive Arc to the current path. | |
| void | elliptic (const Vertex3 ¢er, const Vertex3 &majorAxis, const Vertex3 &minorAxis, double startAngle, double endAngle) |
| This method is used to add the graphics primitive Elliptic to the current path. | |
| void | nurbs (Nurbs *nurbs) |
| This method draws a NURBS (Non-Uniform Rational Basis-Spline) curve. | |
| virtual void | drawLineSegment (const Vertex3 &start, const Vertex3 &end)=0 |
| This method draws a straight line between two points in the target context. | |
| virtual void | finishStroke ()=0 |
| virtual void | drawPoint (const Vertex3 &point)=0 |
| This method draws a point on the target context. | |
| virtual void | resetLinePatternOffset ()=0 |
| This method resets the line pattern for drawing, so that when starting a new line, the pattern starts from the beginning. This is particularly important for hatching. | |
| bool | wantCancel () |
Public Member Functions inherited from jm::Object | |
| Object () noexcept | |
| Constructor. | |
| virtual | ~Object () noexcept |
| Destructor. | |
| void | release () noexcept |
| Decreases the reference counter and releases the object immediately when the reference counter becomes 0. | |
| Object * | retain () noexcept |
| Increases the reference counter of this object by 1. | |
| Object * | autorelease () noexcept |
| Same function as release(), but releases the object with a delay if the reference counter is 0. AutoreleasePool::drain() must be called in the to release the object. | |
| int32 | referenceCount () const noexcept |
| Returns the value of the reference counter. | |
| virtual bool | equals (const Object *other) const |
| Comparison of objects. | |
| virtual String | displayName () const |
| Returns the display name of the object intended to present to a user. | |
| virtual void | printDiffInfo (DiffOperation operation, Object *other) const |
| Output method for outputting the diff results for the diff algorithm. | |
| void | setHighBit (bool status) noexcept |
| bool | highBit () const noexcept |
Protected Member Functions | |
| void | blindLine (const Vertex3 &p1, const Vertex3 &p2) |
| void | putLine (const Vertex3 &p1, const Vertex3 &p2, bool pendown) |
This class provides the parent class for the graphic output. This class draws.
| jm::PaintingBackend::PaintingBackend | ( | ) |
Constructor.
|
override |
Destructor.
| void jm::PaintingBackend::arc | ( | const Vertex3 & | center, |
| const Vertex3 & | normal, | ||
| double | radius, | ||
| double | startAngle, | ||
| double | endAngle | ||
| ) |
This method is used to add the graphics primitive Arc to the current path.
If the end angle is greater than the start angle, the arc is drawn in a counter-clockwise direction. If the end angle is less than the start angle, the arc is drawn in a clockwise direction.
| center | The center of the arc in global WCS coordinates. |
| normal | The resulting direction vector of the arc plane. |
| radius | The scaled radius of the arc. |
| startAngle | The start angle in degrees. |
| endAngle | The end angle in degrees. |
| void jm::PaintingBackend::blindTo | ( | const Vertex3 & | pt | ) |
This method "draws" an invisible line to the new point. This is necessary because, for example, in hatching, the line pattern depends on the position and lines may be interrupted. Here, only the offset in the line pattern is changed.
| pt | The new position in the WCS. |
| void jm::PaintingBackend::cancelProcess | ( | bool | status | ) |
This method is called to interrupt the work of the drawing thread as soon as possible.
| status | The status of the cancellation. If "true", the drawing thread should be interrupted. |
|
pure virtual |
Returns the current color used for drawing on the target context.
|
pure virtual |
This method draws a straight line between two points in the target context.
| start | The starting point of the line. |
| end | The ending point of the line. |
|
pure virtual |
This method draws a point on the target context.
| point | The point to be drawn. |
| void jm::PaintingBackend::elliptic | ( | const Vertex3 & | center, |
| const Vertex3 & | majorAxis, | ||
| const Vertex3 & | minorAxis, | ||
| double | startAngle, | ||
| double | endAngle | ||
| ) |
This method is used to add the graphics primitive Elliptic to the current path.
| center | The center of the ellipse in global WCS coordinates. |
| majorAxis | The major axis of the ellipse. |
| minorAxis | The minor axis of the ellipse. |
| startAngle | The start angle in radians. |
| endAngle | The end angle in radians. |
|
pure virtual |
This method closes the current path, fills the enclosed area with the current color, and implicitly opens a new path.
|
pure virtual |
This method closes the current path, fills the enclosed area with the current color, draws it, and implicitly opens a new path.
|
pure virtual |
| void jm::PaintingBackend::lineTo | ( | const Vertex3 & | pt | ) |
This method moves the pen from the current position to the new position, and draws a straight line in the process.
| pt | The new position in the WCS. |
|
pure virtual |
/brief Returns the current line weight used for drawing on the target context.
| void jm::PaintingBackend::moveTo | ( | const Vertex3 & | pt | ) |
This method moves the pen from the current position to the new position, without drawing anything.
| pt | The new position in the WCS. |
| void jm::PaintingBackend::nurbs | ( | Nurbs * | nurbs | ) |
This method draws a NURBS (Non-Uniform Rational Basis-Spline) curve.
| nurbs | The object describing the curve. |
| void jm::PaintingBackend::popTransform | ( | ) |
This method removes the top element from the transformation stack.
| void jm::PaintingBackend::pushTransform | ( | const Matrix & | t | ) |
This method pushes a new transformation onto the transformation stack.
| t | The transformation to be pushed onto the stack. |
|
protected |
|
pure virtual |
This method resets the line pattern for drawing, so that when starting a new line, the pattern starts from the beginning. This is particularly important for hatching.
|
pure virtual |
This method changes the color used for drawing on the target context.
| color | The RGB color used for drawing. |
|
pure virtual |
This method sets the line weight used for drawing the objects.
| lineweight | The line weight. |
| void jm::PaintingBackend::stroke | ( | ) |
This method closes the current path, draws it, and implicitly opens a new path.
| bool jm::PaintingBackend::wantCancel | ( | ) |