Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
|
#include <CGraphicsGooCanvas.hpp>
Public Types | |
enum class | EDashedLineType { Continuous , Dashed4_2 } |
enum class | EDetailLevel { Low , Normal , High , VeryHigh } |
enum class | EDrawSolidType { Smooth , Solid , Wire } |
enum class | ELight { General , Light0 } |
enum class | ELightType { Ambient , Diffuse , Specular } |
enum class | EMatrixModel { ModelView , Projection } |
Public Member Functions | |
CGraphicsGooCanvas () | |
CGraphicsGooCanvas (GtkWidget *gooCanvasWidget) | |
CGraphicsGooCanvas (const CGraphicsGooCanvas &other)=delete | |
CGraphicsGooCanvas (CGraphicsGooCanvas &&other)=delete | |
~CGraphicsGooCanvas () override=default | |
CGraphicsGooCanvas & | operator= (const CGraphicsGooCanvas &other)=delete |
CGraphicsGooCanvas & | operator= (CGraphicsGooCanvas &&other)=delete |
void | setBackGroundColor (iv::types::color rgb) override |
void | setClearColor () override |
void | initDevice () override |
void | initLight () override |
void | clear () override |
void | defineMaterial (const iv::ui::graphics::Material *material, const bool &isChanged) override |
bool | isDefinedMaterial (const std::string &materialName) override |
void | pushMaterial () override |
void | setMaterial (const std::string &materialName) override |
void | popMaterial () override |
void | setColorRGB (iv::types::color rgb) override |
void | setColorARGB (iv::types::color argb) override |
void | setLineWidth (float width) override |
void | setAlpha (float alpha) override |
void | resetAlpha () override |
void | setOnTexture (bool enableTexture) override |
std::shared_ptr< iv::ui::graphics::Image > | loadImage (const iv::ui::resources::ImageResource &resource) override |
void | appendMatrix (const CMatrix4x4 &matrix) override |
void | setModelMatrix (IGraphics::EMatrixModel matrixModel) override |
void | popTransformation () override |
void | pushTransformation () override |
void | resetTransformation () override |
void | defineLight (IGraphics::ELight light, IGraphics::ELightType lightType, double rColor, double gColor, double bColor) override |
void | positionLight (IGraphics::ELight light, double x, double y, double z) override |
void | viewport (int32_t x, int32_t y, uint64_t sizeX, uint64_t sizeY) override |
void | definePerspective (double fovY, double ratioXForY, double zNear, double zFar) override |
void | defineOrthogonal (double xOrg, double yOrg, double zOrg, double xMin, double yMin, double zMin, double xMax, double yMax, double zMax) override |
void | positionCamera (double eyeX, double eyeY, double eyeZ, double pointReferenceX, double pointReferenceY, double pointReferenceZ, double upX, double upY, double upZ) override |
void | rotation (double angleDegrees, double Ux, double Uy, double Uz) override |
void | scale (double sx, double sy, double sz) override |
void | setNormal (double Nx, double Ny, double Nz) override |
void | translation (double tx, double ty, double tz) override |
void | drawContours (const std::vector< std::shared_ptr< std::vector< iv::math::geometry::Point3d > > > &contours) override |
void | drawFanTriangles (const float *points, const float *normals, const float *textureOpt, const float *rgbaOpt, uint64_t numPoints, const uint32_t *indVertex, uint64_t numVertex) override |
void | drawImage (double x, double y, double width, double height, const iv::ui::resources::ImageResource &resource) override |
void | drawImageRawSize (double x, double y, const iv::ui::resources::ImageResource &resource) override |
void | drawImageWithColor (double x, double y, iv::types::color colorRGB, double width, double height, const iv::ui::resources::ImageResource &resourceName) override |
void | drawLine (double x1, double y1, double z1, double x2, double y2, double z2) override |
void | drawLineWithStyle (double x1, double y1, double z1, double x2, double y2, double z2, IGraphics::EDashedLineType dashedLineType) override |
void | drawArc (double radiusMark, iv::types::radian angleInitial, iv::types::radian angleFinal, float thickness, uint64_t kPrvNumPoints) override |
void | drawPolyline (const float *vertex, uint64_t numVertex) override |
void | drawPolylineFilled (const float *vertex, uint64_t numVertex) override |
void | drawPolylinesWithColors (const std::shared_ptr< std::vector< iv::math::geometry::Point2d > > &points, const std::vector< iv::math::geometry::Point3d > &rgb) override |
void | drawQuads (double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, double x4, double y4, double z4) override |
void | drawRect (double x1, double y1, double x2, double y2) override |
void | drawRectFilled (double x1, double y1, double x2, double y2) override |
void | drawStripTriangles (const float *points, const float *normals, const float *textureOpt, const float *rgbaOpt, uint64_t numPoints, const uint32_t *indVertex, uint64_t numVertex) override |
void | drawText (const std::string &text, double x, double y, double height, unsigned char justify) override |
void | drawTextWithDeviceHeight (const std::string &text, double x, double y, double height, unsigned char justify) override |
void | drawTriangle (double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3) override |
void | drawTriangles (const float *points, const float *normals, const float *textureOpt, const float *rgbaOpt, uint64_t numPoints, const uint32_t *indVertex, uint64_t numVertex) override |
void | drawUnitCone (IGraphics::EDetailLevel detailLevel) override |
void | drawUnitCube () override |
void | drawUnitCylinder (IGraphics::EDetailLevel detailLevel) override |
void | drawUnitDisk (IGraphics::EDetailLevel detailLevel) override |
void | drawUnitSphere (IGraphics::EDetailLevel detailLevel) override |
bool | hasDrawPolylineFilled () const override |
void | setModeDraw (IGraphics::EDrawSolidType drawSolidType) override |
uint32_t | blockTextWithModifiers (const std::string &text, const iv::ui::TextModifier &textModifier, double *widthText, double *heightTextOut) override |
void | drawBlockText (uint32_t idBlockText, double x, double y, double widthText, double heigthText, unsigned char justify) override |
void | endBlockText (uint32_t *idBlockText) override |
bool | hasBlockText () const override |
uint32_t | beginBlock () override |
void | drawBlock (uint32_t idBlock) override |
void | endBlock (uint32_t idBlock) override |
bool | hasManagerBlocks () const override |
void | removeBlock (uint32_t *idBlock) override |
void | beginStencilBuffer () override |
void | endStencilBuffer () override |
void | offStencilBuffer () override |
void | onStencilBuffer () override |
void | getCoordTextCornerLeftDown (const std::string &text, double x, double y, double heightCharacter, unsigned char justify, double *xCornerLeftDown, double *yCornerLeftDown, double *widthTextOpt, double *heightTextOpt) override |
void | getSizePixelToWorld (double sizePixelX, double sizePixelY, double *sizeWorldXOpt, double *sizeWorldYOpt) override |
void | getSizeText (const std::string &text, double heightCharacter, double *widthText, double *heightText) override |
void | setBlend (bool isEnable) override |
void | setTestDepth (bool isEnable) override |
ICanvasItem * | rootItemGooCanvas () |
ICanvasItem * | newGroupItemGooCanvas (ICanvasItem *parent,...) |
ICanvasItem * | newPathGooCanvas (ICanvasItem *parent, const std::string &pathData,...) |
ICanvasItem * | newRectGooCanvas (ICanvasItem *parent, double x, double y, double width, double height,...) |
void | updateRectGooCanvas (ICanvasItem *parent, int32_t childNum, double width, double height) |
ICanvasItem * | newEllipseGooCanvas (ICanvasItem *parent, double x, double y, double radiusX, double radiusY,...) |
void | updateEllipseGooCanvas (ICanvasItem *parent, int32_t childNum, double width, double height) |
ICanvasItem * | newTextGooCanvas (ICanvasItem *parent, const std::string &text, double x, double y, double width, iv::ui::eAnchorPoint anchorPoint,...) |
void | setChildTextPropertyGooCanvas (ICanvasItem *parent, int32_t childNum, const std::string &propertyName, const std::string &propertyValue) |
void | setChildTextPropertyGooCanvas (ICanvasItem *parent, int32_t childNum, std::string_view propertyName, double propertyValue) |
void | setItemSignalsGooCanvas (ICanvasItem *canvasItem, AbstractCanvasItem *abstractCanvasItem, iv::logic::eLogicsElementType lEType) |
void | setItemLineDashGooCanvas (ICanvasItem *canvasItem, uint16_t numDashes, float dashLength, float gapLength, float startOffset, bool activate) |
void | translateItemGooCanvas (ICanvasItem *canvasItem, double xDistance, double yDistance) |
Static Public Member Functions | |
static void | deleteItemGooCanvas (ICanvasItem *canvasItem) |
static void | raiseItemGooCanvas (ICanvasItem *canvasItem, ICanvasItem *aboveCanvasItem) |
static void | setItemTextPropertyGooCanvas (ICanvasItem *canvasItem, const std::string &propertyName, const std::string &propertyValue) |
static void | setItemPositionGooCanvas (ICanvasItem *canvasItem, double x, double y) |
static void | setItemStackIndexGooCanvas (ICanvasItem *parent, ICanvasItem *child, int32_t childIndex) |
static void | grabItemGooCanvas (ICanvasItem *canvasItem, bool grab) |
Static Public Attributes | |
static constexpr uint32_t | BlockNull = UINT_MAX |
Private Attributes | |
GtkWidget * | m_gooCanvasWidgetRef |
|
stronginherited |
|
stronginherited |
|
stronginherited |
|
stronginherited |
|
stronginherited |
|
stronginherited |
CGraphicsGooCanvas::CGraphicsGooCanvas | ( | ) |
|
explicit |
|
delete |
|
delete |
|
overridedefault |
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
static |
CGraphicsGooCanvas::deleteItemGooCanvas
Deletes item in the canvas
[in] | item | Canvas item to delete. |
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
static |
CGraphicsGooCanvas::grabItemGooCanvas
Grabs or ungrabs an item in the canvas, depending on the parameter 'grab'.
[in] | canvasItem | Item to grab/ungrab. |
[in] | grab | Flag indicating whether to grab the item (true) or as ungrab it (false). |
|
nodiscardoverridevirtual |
Implements IGraphics.
|
nodiscardoverridevirtual |
Implements IGraphics.
|
nodiscardoverridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
ICanvasItem * CGraphicsGooCanvas::newEllipseGooCanvas | ( | ICanvasItem * | parent, |
double | x, | ||
double | y, | ||
double | radiusX, | ||
double | radiusY, | ||
... ) |
CGraphicsGooCanvas::drawEllipseGooCanvas
Creates -to draw- an ellipse using goocanvas
[in] | parent | Parent item that will own the new item. |
[in] | x | Position x. |
[in] | y | Position y. |
[in] | radiusX | Radius of the ellipses in axis x. |
[in] | radiusY | Radius of the ellipses in axis y. |
[in] | ... | Optional pairs of GooCanvasEllipse property names and values, and a terminating nullptr. |
ICanvasItem * CGraphicsGooCanvas::newGroupItemGooCanvas | ( | ICanvasItem * | parent, |
... ) |
CGraphicsGooCanvas::createGroupGooCanvas
Creates a new group item
[in] | parent | Parent item that will own the new item, or nullptr to set gooCanvas widget as the parent. |
[in] | ... | Optional pairs of GooCanvasGroup property names and values, and a terminating nullptr. |
ICanvasItem * CGraphicsGooCanvas::newPathGooCanvas | ( | ICanvasItem * | parent, |
const std::string & | pathData, | ||
... ) |
CGraphicsGooCanvas::drawPathGooCanvas
Creates -to draw- a path (a series of different shaped segments) using goocanvas
[in] | parent | Parent item that will own the new item. |
[in] | pathData | data indicating the segments to draw in the path. |
[in] | ... | Optional pairs of GooCanvasText property names and values, and a terminating nullptr. |
ICanvasItem * CGraphicsGooCanvas::newRectGooCanvas | ( | ICanvasItem * | parent, |
double | x, | ||
double | y, | ||
double | width, | ||
double | height, | ||
... ) |
CGraphicsGooCanvas::drawRectGooCanvas
Creates -to draw- a rectangle using goocanvas
[in] | parent | Parent item that will own the new item. |
[in] | x | Position x. |
[in] | y | Position y. |
[in] | width | Width of the rectangle. |
[in] | height | Height of the rectangle. |
[in] | ... | Optional pairs of GooCanvasRect property names and values, and a terminating nullptr. |
ICanvasItem * CGraphicsGooCanvas::newTextGooCanvas | ( | ICanvasItem * | parent, |
const std::string & | text, | ||
double | x, | ||
double | y, | ||
double | width, | ||
iv::ui::eAnchorPoint | anchorPoint, | ||
... ) |
CGraphicsGooCanvas::drawTextGooCanvas
Creates -to draw- text using goocanvas
[in] | parent | Parent item that will own the new item. |
[in] | text | Text to draw. |
[in] | x | Position x. |
[in] | y | Position y. |
[in] | width | Width of the text to draw (-1 if unlimited). |
[in] | ... | Optional pairs of GooCanvasText property names and values, and a terminating nullptr. |
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
delete |
|
delete |
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
static |
CGraphicsGooCanvas::raiseItemGooCanvas
Raises an item in the stacking order above another item.
[in] | canvasItem | Item to raise in the stacking order. |
[in] | aboveCanvasItem | Item to raise canvasItem above, or NULL to raise canvasItem to the top of the stack. |
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
ICanvasItem * CGraphicsGooCanvas::rootItemGooCanvas | ( | ) |
CGraphicsGooCanvas::createGroupGooCanvas
Returns a new item for the root of the canvas
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
void CGraphicsGooCanvas::setChildTextPropertyGooCanvas | ( | ICanvasItem * | parent, |
int32_t | childNum, | ||
const std::string & | propertyName, | ||
const std::string & | propertyValue ) |
CGraphicsGooCanvas::setChildTextPropertyGooCanvas
Sets child property.
[in] | parent | Parent item of the child to update. |
[in] | childNum | Child index to update. |
[in] | propertyName | Name of the property to set. |
[in] | propertyValue | Value of the property to set. |
void CGraphicsGooCanvas::setChildTextPropertyGooCanvas | ( | ICanvasItem * | parent, |
int32_t | childNum, | ||
std::string_view | propertyName, | ||
double | propertyValue ) |
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
void CGraphicsGooCanvas::setItemLineDashGooCanvas | ( | ICanvasItem * | canvasItem, |
uint16_t | numDashes, | ||
float | dashLength, | ||
float | gapLength, | ||
float | startOffset, | ||
bool | activate ) |
CGraphicsGooCanvas::setItemLineDashGooCanvas
Draws an item with a line dash or not, depending on the parameter 'activate'.
[in] | canvasItem | Item to set/unset a line dash to. |
[in] | activate | Flag indicating whether to draw the line dash (true) or not (false). |
|
static |
CGraphicsGooCanvas::setItemPositionGooCanvas
Sets item position.
[in] | canvasItem | Item to set the position. |
[in] | x | X coordinate. |
[in] | y | Y coordinate. |
void CGraphicsGooCanvas::setItemSignalsGooCanvas | ( | ICanvasItem * | canvasItem, |
AbstractCanvasItem * | abstractCanvasItem, | ||
iv::logic::eLogicsElementType | lEType ) |
CGraphicsGooCanvas::setItemSignalsGooCanvas
Sets item signals.
[in] | canvasItem | Item to set the signals too. |
|
static |
CGraphicsGooCanvas::setItemStackIndexGooCanvas
Sets stack index of the child item in the parent item.
[in] | parent | Parent item of the child to set index of. |
[in] | child | Child item for which to update the index. |
|
static |
CGraphicsGooCanvas::setItemTextPropertyGooCanvas
Updates a text property of a goocanvas item.
[in] | canvasItem | Item whose text property to update. |
[in] | propertyName | Name of the property to set. |
[in] | propertyValue | Value of the property to set. |
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
|
overridevirtual |
Implements IGraphics.
void CGraphicsGooCanvas::translateItemGooCanvas | ( | ICanvasItem * | canvasItem, |
double | xDistance, | ||
double | yDistance ) |
CGraphicsGooCanvas::translateItemGooCanvas
Translates an object a distance <xDistance, yDistance>
[in] | canvasItem | Item to draw as selected/unselected. |
[in] | xDistance | X value of the distance to move the item. |
[in] | yDistance | Y value of the distance to move the item. |
|
overridevirtual |
Implements IGraphics.
void CGraphicsGooCanvas::updateEllipseGooCanvas | ( | ICanvasItem * | parent, |
int32_t | childNum, | ||
double | width, | ||
double | height ) |
CGraphicsGooCanvas::updateEllipseGooCanvas
Updates ellipse using goocanvas
[in] | parent | Parent item of the child to update. |
[in] | childNum | Child index to update. |
[in] | width | Width of the ellipse. |
[in] | height | Height of the ellipse. |
void CGraphicsGooCanvas::updateRectGooCanvas | ( | ICanvasItem * | parent, |
int32_t | childNum, | ||
double | width, | ||
double | height ) |
CGraphicsGooCanvas::updateRectGooCanvas
Updates rectangle using goocanvas
[in] | parent | Parent item of the child to update. |
[in] | childNum | Child index to update. |
[in] | width | Width of the rectangle. |
[in] | height | Height of the rectangle. |
|
overridevirtual |
Implements IGraphics.
|
staticconstexprinherited |
|
private |