/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance"). // All rights reserved. // // This software and its documentation and related materials are owned by // the Alliance. The software may only be incorporated into application // programs owned by members of the Alliance, subject to a signed // Membership Agreement and Supplemental Software License Agreement with the // Alliance. The structure and organization of this software are the valuable // trade secrets of the Alliance and its suppliers. The software is also // protected by copyright law and international treaty provisions. Application // programs incorporating this software must include the following statement // with their copyright notices: // // This application incorporates Open Design Alliance software pursuant to a license // agreement with Open Design Alliance. // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// #ifndef _EXGSGDIGEOMETRY_H_INCLUDED_ #define _EXGSGDIGEOMETRY_H_INCLUDED_ #include "TD_PackPush.h" #include "IntArray.h" #include "Gi/GiGeometrySimplifier.h" #include "Gi/GiPlotGenerator.h" #include "Ps/PlotStyles.h" #include "Gi/GiPlotStyleDefs.h" #include "../ExColorConverterCallback.h" #include "UInt8Array.h" #include "CmColorBase.h" #include "ExGiGDIDC.h" class ExGDIVectorizeView; class OdGiSelfGdiDrawable; typedef OdArray > POINTArray; #ifndef _WIN32_WCE typedef OdArray > GRADIENT_TRIANGLEArray; typedef OdArray > TRIVERTEXArray; #endif //#ifndef _WIN32_WCE /** \details This class implements Geometry Simplifier objects for GDI Vectorizer Device objects. */ class ExGiGDIGeometry : public OdGiGeometrySimplifier, public OdGiPlotGenerator::PolylineOut { public: enum LineType { kLtpSolid = OdPs::kLtpSolid, kLtpNull = OdPs::kLtpUseObject, kLtpForSelection = OdPs::kLtpLast + 1 }; /** \details Sets the draw linetype for this Vectorizer object. \param linetype [in] Linetype. */ void draw_pslinetype(LineType linetype); /** \details Represents a fill style. A fill style can be used during painting, for example to apply a hatch pattern to clipped geometry. */ enum FillStyle { /** Solid filling style. */ kFsSolid = OdPs::kFsSolid, /** Checkerboard filling style. */ kFsCheckerboard = OdPs::kFsCheckerboard, /** Crosshatch filling style. */ kFsCrosshatch = OdPs::kFsCrosshatch, /** Diamonds filling style. */ kFsDiamonds = OdPs::kFsDiamonds, /** Horizontal bars filling style */ kFsHorizontalBars = OdPs::kFsHorizontalBars, /** Slant left filling style. */ kFsSlantLeft = OdPs::kFsSlantLeft, /** Slant right filling style. */ kFsSlantRight = OdPs::kFsSlantRight, /** Square dots filling style. */ kFsSquareDots = OdPs::kFsSquareDots, /** Vertical bars filling style. */ kFsVerticalBars = OdPs::kFsVerticalBars, /** Hollow filling style. */ kFsHollow = OdPs::kFsUseObject, /** Filling style for selected objects. */ kFsForSelection = OdPs::kFsLast + 1 }; /** \details Sets the draw fillstyle for this Vectorizer Device object. \param fillStyle [in] Fill style. */ void draw_fillStyle(FillStyle fillStyle); private: bool isExtPen() const; HPEN createCurrentPen(); const OdGiPsLinetypes::PsLinetypeGDI *m_psLinetypeDefs; const OdGiPsFillstyles::PsFillstyleGDI *m_psFillstyleDefs; #ifndef _WIN32_WCE typedef void (ExGiGDIGeometry::*TriangleFn) (const OdInt32* pTriangleVertices, const OdGeVector3d* pNormal); HINSTANCE m_hinstMsImgDll; FARPROC m_grFillPrAddr, m_alphaBlendPrAddr; FARPROC m_dcBrushClrPrAddr; GRADIENT_TRIANGLEArray m_triangles; TRIVERTEXArray m_triVertexes; TriangleFn m_triangleFn; struct SolidTriangle { POINT points[ 3 ]; }; OdArray< SolidTriangle > m_solidTriangles; OdArray< POINT > m_solidVertices; #endif //#ifndef _WIN32_WCE OdGePoint3d m_trianglePts[3]; OdIntArray m_clipStack; HGDIOBJ m_hOldPen; HGDIOBJ m_hOldBrush; HPEN m_hNullPen; HPEN m_hThinPen; HPEN m_hExPen; HBRUSH m_hNullBrush; POINTArray m_dcPoints; // LOGPEN m_logPen; LOGBRUSH m_logBrush; DWORD m_dwPenStyle; DWORD m_dwWidth; DWORD *m_lpStyle; DWORD m_dwStyleCount; LOGBRUSH m_penBrush; OdRxObjectPtr m_pPVC; const ODCOLORREF* m_paletteColors; OdUInt16 m_numPaletteColors; OdGsDCRect m_rcTarget; ExGiGDIDC* m_hTargetDC; HDC safeTargetDC() const { if( !m_hTargetDC ) return (HDC)NULL; return m_hTargetDC->targetDC(); } // old device traits OdPs::LineEndStyle m_oldEndStyle; OdPs::LineJoinStyle m_oldJoinStyle; LineType m_oldLinetype; FillStyle m_oldFillStyle; int m_oldBkMode; // Global transparency bool m_bGlobalAlpha; int m_nGlobalAlpha; ODCOLORREF m_clrFadeColor; // LineWeight settings OdPs::LineEndStyle m_lwdCapStyle; OdPs::LineJoinStyle m_lwdJoinStyle; bool m_bPointsLwd; bool m_bExtLwdStyle; bool m_bLwdOverride; bool m_bTextFill; bool m_bHatchFill; protected: // Gradients printing bool m_bGradientAsBitmap; bool m_bGradientAsPolys; OdUInt8 m_nGradientAsPolysSubdivideTreshold; // Color conversion callback OdColorConverterCallbackCaching m_colorConverter; // GradientFill replacement void renderGradientTriangles( ExGiGDIDC* hdc ); public: /** \details Sets the draw color for this Vectorizer Device object. \param color [in] Color. */ void draw_color(const OdCmEntityColor& color); /** \details Sets the draw color for this Vectorizer Device object. \param color [in] Color. */ void draw_color(COLORREF color); /** \details Sets the draw transparency for this Vectorizer Device object. \param transp [in] Transparency. */ void draw_transparency( OdCmTransparency transp ); /** \details Sets the draw color index for this Vectorizer Device object. \param colorIndex [in] Color index. */ void draw_color_index(int colorIndex); /** \details Sets the draw lineweight for this Vectorizer Device object. \param lineweight [in] Lineweight in pixels. */ void draw_lineweight(int lineweight); /** \details Sets the draw endstyle for this Vectorizer Device object. \param endStyle [in] Endstyle. */ void draw_endStyle(OdPs::LineEndStyle endStyle); /** \details Sets the draw joinstyle for this Vectorizer Device object. \param joinStyle [in] Joinstyle. */ void draw_joinStyle(OdPs::LineJoinStyle joinStyle); /** \details Sets the draw background mode for this Vectorizer Device object. \param bkMode [in] Background mode. \remarks bkMode will be one of the following: NameDescription OPAQUE Entities are drawn opaque TRANSPARENT Entities are drawn transparent
*/ void draw_bkMode(int bkMode); /** \details Sets the global alpha usage. If global alpha usage is enabled, all graphical objects in a scene receive a an alpha value discarding those that are part of the object's traits. \param bFlag [in] Flag that specifies whether to use alpha value that is applied to all graphical objects in a scene. */ void draw_globalAlpha(bool bFlag) { m_bGlobalAlpha = bFlag; } /** \details Sets the global alpha usage. If global alpha usage is enabled, all graphical objects in a scene receive a an alpha value discarding those that are part of the object's traits. \param bFlag [in] Flag that specifies whether to use alpha value that is applied to all graphical objects in a scene. \param nAlpha [in] Value for the alpha channel. \param fadeColor [in] Fade color. */ void draw_globalAlpha(bool bFlag, int nAlpha, ODCOLORREF fadeColor) { m_bGlobalAlpha = bFlag; m_nGlobalAlpha = nAlpha; m_clrFadeColor = fadeColor; } /** \details Sets the lineweight settings. \param bPointsLwd [in] Flag that specifies whether to apply lineweight setting to points. \param lwdCapStyle [in] Line end style. Specifies the look of lines on line ends. \param lwdJoinStyle [in] Line join style. Specifies the look of lines where line segments are joined. */ void setLineWeightSettings(bool bPointsLwd, OdPs::LineEndStyle lwdCapStyle, OdPs::LineJoinStyle lwdJoinStyle) { m_bPointsLwd = bPointsLwd; m_lwdCapStyle = lwdCapStyle; m_lwdJoinStyle = lwdJoinStyle; m_bExtLwdStyle = (m_lwdCapStyle != OdPs::kLesRound) || (m_lwdJoinStyle != OdPs::kLjsRound); } /** \details Checks whether lineweight is applied for points. \returns true if lineweight is applied to points, false otherwise. */ bool isPointsLineWeightEnabled() const { return m_bPointsLwd; } /** \details Returns lineweight cap style. This setting specifies the look of lines on line ends. \returns Value from the OdPs::LineEndStyle enumeration that represents the line end style. */ OdPs::LineEndStyle getLineWeightCapStyle() const { return m_lwdCapStyle; } /** \details Returns lineweight cap style. This setting specifies the look of lines where line segments are joined. \returns Value from the OdPs::LineJoinStyle enumeration that represents the line join style. */ OdPs::LineJoinStyle getLineWeightJoinStyle() const { return m_lwdJoinStyle; } bool isLineWeightStyleExtended() const { return m_bExtLwdStyle; } /** \details This structure contains lineweight override settings. */ struct LwdOverrideSettings { bool m_bOverride, m_bPointsLwd; int m_nLwd; LwdOverrideSettings(bool bOverride, bool bPointsLwd, int nLwd) : m_bOverride(bOverride), m_bPointsLwd(bPointsLwd), m_nLwd(nLwd) {} }; /** \details Sets the lineweight override settings. \param pIn [in] Lineweight override settings. \param pOut [out] (Optional) Receives current lineweight override settings. */ void setLineweightOverride(const LwdOverrideSettings &pIn, LwdOverrideSettings *pOut = NULL) { if (pOut) { *pOut = LwdOverrideSettings(m_bLwdOverride, m_bPointsLwd, (int)m_dwWidth); } m_bLwdOverride = false; m_bPointsLwd = pIn.m_bPointsLwd; draw_lineweight(pIn.m_nLwd); m_bLwdOverride = pIn.m_bOverride; } /** \details Enables TTF text filling, drawn using Windows API. \param bSet [in] New text filling state. */ void setTextFill(bool bSet) { m_bTextFill = bSet; } /** \details Sets gradient printing properties. \param bPrintAsBitmap [in] Flag that specifies whether to print gradients as bitmaps. \param bPrintAsPolys [in] Flag that specifies whether to print gradients as polygons. \param nThreshold [in] Threshold coefficient for conversion of gradients into polygons. \remarks Some print drivers don't support gradients or they render gradients into intermediate bitmaps with an opaque background which can overlap visible geometry. The 'bPrintAsBitmap' flag enables conversion of gradients into bitmaps with a transparent background before printing. Not all print drivers support transparent bitmaps, but this option is useful for some of them, for example, XPS Document Writer supports transparent bitmaps. The 'bPrintAsPolys' flag enables conversion of gradients into a set of simple polygons which is supported by any printing driver. The 'nThreshold' parameter is relevant only if 'bPrintAsPolys' flag is used. This value is a coefficient that represents the maximum deviation of color components between separately generated color polygons. Increasing the coefficient minimizes the number of generated polygons. Decreasing the coefficient increases the number of generated polygons and output gradient quality. */ void setGradientPrintProps(bool bPrintAsBitmap, bool bPrintAsPolys, OdUInt8 nThreshold) { m_bGradientAsBitmap = bPrintAsBitmap; m_bGradientAsPolys = bPrintAsPolys; m_nGradientAsPolysSubdivideTreshold = nThreshold; } //DOM-IGNORE-BEGIN /** \details Enables or disables the special mode for processing geometry that uses TrueType fonts. \param bSet [in] Flag that enables or disables the mode. */ void enableTTFProcessing(bool bSet) { m_bProcessingTTF = bSet; } void startThinPenOverride(); void endThinPenOverride(); //DOM-IGNORE-END /** \details Enables solid hatch filling mode, which could be solved during printing. \param bSet [in] Flag that enables or disables the mode. */ void setHatchFill(bool bSet) { m_bHatchFill = bSet; } protected: bool plotGeneratorPolylineOut(const OdGePoint3d *pPoints, OdUInt32 nPoints, OdPs::LineEndStyle capStyle, OdPs::LineJoinStyle joinStyle, double fLwd) override; HGDIOBJ thinPen(); HGDIOBJ nullPen() { return (HGDIOBJ)m_hNullPen; } bool ttfProcessingPenOverride() const { return m_bProcessingTTF && (m_dwWidth > 1) && !m_thinPenOverride; } DWORD m_thinPenOverride; bool m_bThinPenValid; bool m_bPenValid; bool m_bBrushValid; bool m_bDrawSelection; bool m_bDrawDragging; bool m_bProcessingTTF; /** Hidden geometry flag */ bool m_bHiddenGeometry; OdUInt8 m_suppressByHlt; public: /** \details Default constructor for the ExGiGDIGeometry class. */ ExGiGDIGeometry(); /** \details Destructor for the ExGiGDIGeometry class. */ ~ExGiGDIGeometry() override; /** \details Returns the pen style for this Vectorizer Device object. \returns Pen style that can be one of the following: * PS_SOLID - Solid pen. * PS_DASH - Dashed pen. * PS_DOT - Dotted pen. * PS_DASHDOT - Pen with alternating dashes and dots. * PS_DASHDOTDOT - Pen with alternating dashes and double dots. * PS_NULL - Null pen. * PS_INSIDEFRAME - Pen that draws a line inside the frame of closed shapes produced by the Windows GDI output functions that specify a bounding rectangle. */ OdInt32 penStyle() const { return m_dwPenStyle; } /** \details Returns the brush style for this Vectorizer Device object. \returns Brush style that can be one of the following: * HS_BDIAGONAL - Downward hatch (left to right) at 45 degrees. * HS_CROSS - Horizontal and vertical crosshatch. * HS_DIAGCROSS - Crosshatch at 45 degrees. * HS_FDIAGONAL - Upward hatch (left to right) at 45 degrees. * HS_HORIZONTAL - Horizontal hatch. * HS_VERTICAL - Vertical hatch. */ OdInt32 brushStyle() const { return m_logBrush.lbStyle; } /** \details Sets the pen style for this Vectorizer Device object. \param penStyle [in] Pen style. \remarks Pen style that can be one of the following: * PS_SOLID - Solid pen. * PS_DASH - Dashed pen. * PS_DOT - Dotted pen. * PS_DASHDOT - Pen with alternating dashes and dots. * PS_DASHDOTDOT - Pen with alternating dashes and double dots. * PS_NULL - Null pen. * PS_INSIDEFRAME - Pen that draws a line inside the frame of closed shapes produced by the Windows GDI output functions that specify a bounding rectangle. */ void setPenStyle(OdInt32 penStyle) { m_dwPenStyle = penStyle; } /** \details Sets the brush style for this Vectorizer Device object. \param brushStyle [in] Brush style. \remarks Brush style that can be one of the following: * HS_BDIAGONAL - Downward hatch (left to right) at 45 degrees. * HS_CROSS - Horizontal and vertical crosshatch. * HS_DIAGCROSS - Crosshatch at 45 degrees. * HS_FDIAGONAL - Upward hatch (left to right) at 45 degrees. * HS_HORIZONTAL - Horizontal hatch. * HS_VERTICAL - Vertical hatch. */ void setBrushStyle(OdInt32 brushStyle) { m_logBrush.lbStyle = brushStyle; } /** \details Checks whether the DrawSelection flag is enabled. \returns true if this flag is enabled, false otherwise. \remarks This flag informs the vectorizer that selection drawing is in progress. Vectorizer can modify geometry behavior in this case. */ bool isSelection() { return m_bDrawSelection; } /** \details Checks whether the DrawSelection flag is enabled. \returns true if this flag is enabled, false otherwise. \remarks This flag informs the vectorizer that dragging is in progress. Vectorizer can modify geometry behavior and optimize rendering in this case. */ bool isDragging() { return m_bDrawDragging; } /** \details Controls the DrawSelection flag for this Vectorizer device. \param drawSelection [in] Controls draw selection. \remarks This flag informs the vectorizer that selection drawing is in progress. Vectorizer can modify geometry behavior in this case. */ void setSelection(bool drawSelection) { m_bDrawSelection = drawSelection; } /** \details Controls the DrawDragging flag for this Vectorizer device. \param drawDragging [in] Controls draw dragging. \remarks This flag informs the vectorizer that dragging is in progress. Vectorizer can modify geometry behavior and optimize rendering in this case. */ void setDragging(bool drawDragging) { m_bDrawDragging = drawDragging; } /** \details Returns true if and only if geometry should be hidden. */ bool isHiddenGeometry(OdUInt8 sFlag = 1) const { return m_bHiddenGeometry || GETBIT(m_suppressByHlt, sFlag); } /** \details Specifies whether geometry should be hidden. \param bHidden [in] Hidden flag value. */ void setHiddenGeometry( bool bHidden ) { m_bHiddenGeometry = bHidden; } /** \details Enable geometry painting suppression by highlighting sign. \param nSuppress [in] Geometry suppression flags. */ void setSuppressHighlight(OdUInt8 nSuppress) { m_suppressByHlt = nSuppress; } /** \details Initializes the paint process for this Vectorizer Device object. \param targetDC [in] Handle to the target device context. */ void beginPaint(ExGiGDIDC* targetDC); /** \details Sets the logical palette for the Vectorizer Device object. \param logicalPalette [in] Logical palette. \param numColors [in] Number of colors in palette. */ void setLogicalPalette(const ODCOLORREF* logicalPalette, OdUInt16 numColors); /** \details Sets the output rectangle for the Vectorizer Device object. \param outputRect [in] Output rectangle. */ void setOutputRect(const OdGsDCRect& outputRect) { m_rcTarget = outputRect; } /** \details Returns a reference to the output rectangle for the Vectorizer Device object. \returns Reference to the output rectangle. */ const OdGsDCRect& outputRect() const { return m_rcTarget; } /** \details Terminates the paint process for the Vectorize Device object. */ void endPaint(); /** \details Controls the pen and brush for the Vectorizer Device object. \param forSelection [in] Flag that specifies whether the selection pen and brush are used. */ void updatePenNBrush(bool bForSelection = false); /** \details Pushes the current device context onto the stack, and creates a new clip boundary. \param points [in] Array of points defining the polygonal clip boundary. \param pointCounts [in] Array of integers specifying the number of points in each polygon. \param numPolygons [in] Number of polygons. \remarks If a two-vertex polygon is specified, the vertices specify the lower-left and upper-right corners of the clip boundary. */ void pushViewportClip(const OdGsDCPoint* points, const int *pointCounts, int numPolygons); /** \details Pushes the current device context onto the stack, and creates a new clip boundary. \param min [in] Lower-left corner of clip boundary. \param max [in] Upper-right corner of clip boundary. \remarks If a two-vertex polygon is specified, the vertices specify the lower-left and upper-right corners of the clip boundary. */ void pushViewportClip(const OdGsDCPoint& min, const OdGsDCPoint& max); /** \details Pushes the current device context onto the stack, and creates a new clip boundary. \param min [in] Lower-left corner of clip boundary. \param max [in] Upper-right corner of clip boundary. \param points [in] Array of points defining the polygonal clip boundary. \param pointCounts [in] Array of integers specifying the number of points in each polygon. \param numPolygons [in] Number of polygons. \remarks If a two-vertex polygon is specified, the vertices specify the lower-left and upper-right corners of the clip boundary. */ void pushViewportClip(OdUInt32 nNumRects, const OdGsDCRect* rects); /** \details Pops the clip boundary from the top of the stack. */ void popViewportClip(); #ifndef _WIN32_WCE /** \details Pre-processes gradient-filled triangles with this Vectorizer Device object. \param numVertices [in] Number of vertices. \param vertexList [in] Array of vertices defining gradient-filled triangles. \param pVertexData [in] Pointer to additional vertex data. \sa endGradientFill \remarks Configures triangleOut() to output gradient-filled triangles. */ bool beginGradientFill(OdInt32 numVertices, const OdGePoint3d* vertexList, const OdGiVertexData* pVertexData); /** \details Output a gradient-filled triangle. \param vertices [in] List of 3 numbers that define the vertices in the triangle. \param pNormal [in] Normal vector for this triangle (ignored). */ void gradientTriangleOut(const OdInt32* vertices, const OdGeVector3d* pNormal); /** \details Outputs filled triangles to the specified device context. \param hdc [in] Handle of device context. \sa beginGradientFill \remarks Configures triangleOut() to output regular (non-filled) triangles. */ void endGradientFill(ExGiGDIDC* hdc); /** \details Outputs a non-filled triangle. \param vertices [in] List of 3 numbers that define the vertices in the triangle. \param pNormal [in] Normal vector for this triangle. */ void regularTriangleOut(const OdInt32* vertices, const OdGeVector3d* pNormal); #endif //#ifndef _WIN32_WCE /** \details Outputs both gradient and regular triangles. \remarks * This function is initialized to output regular (non-filled) triangles. * beginGradientFill configures this function to output gradient-filled triangles. * endGradientFill configures this function to output regular (non-filled) triangles. */ void triangleOut(const OdInt32* vertices, const OdGeVector3d* pNormal) override; /** \details Outputs polyline data. \param numPoints [in] Number of points in the polyline. \param vertexList [in] Array of vertices that make up the polyline. \sa */ void polylineOut(OdInt32 numPoints, const OdGePoint3d* vertexList) override; /** \details Outputs polygon data. \param numPoints [in] Number of points in the polygon. \param vertexList [in] Array of vertices that make up the polygon. \param pNormal [in] Normal vector for the polygon. \sa */ void polygonOut(OdInt32 numPoints, const OdGePoint3d* vertexList, const OdGeVector3d* pNormal = 0) override; /** \details Tessellates a filled wireframe shell. \param faceListSize [in] Number of entries in faceList. \param faceList [in] List of numbers that define the faces in the shell. \param pEdgeData [in] Pointer to additional edge data. \param pFaceData [in] Pointer to additional face data. */ void generateShellFaces(OdInt32 faceListSize, const OdInt32* pFaceList, const OdGiEdgeData* pEdgeData, const OdGiFaceData* pFaceData) override; /** \details Processes polygon data. \param nbPoints [in] Number of points. \param pVertexList [in] Array of vertices. \param pNormal [in] Pointer to the normal vector. \param pExtrusion [in] Pointer to the extrusion vector. \remarks The extrusion vector specifies the direction and distance of the extrusion. \sa */ void polygonProc(OdInt32 nbPoints, const OdGePoint3d* pVertexList, const OdGeVector3d* pNormal, const OdGeVector3d* pExtrusion) override; /** \details Outputs the face of a tessellated shell. \param faceListSize [in] Number of entries in faceList. \param faceList [in] List of numbers that define the face. \param pNormal [in] Normal vector for this face. */ void shellFaceOut(OdInt32 faceListSize, const OdInt32* faceList, const OdGeVector3d* pNormal = 0) override; /** \details Processes TrueType font characters in dynamic polyDraw mode which is similar to shellProc() method, except here additional information about bezier data is passed for processing. \param nbVertex [in] Number of vertices. \param pVertexList [in] Array of vertices. \param faceListSize [in] Number of entries in faceList. \param pFaceList [in] Array of numbers that define the faces. \param pBezierTypes [in] Bezier types. \param pFaceData [in] Pointer to additional face data. */ void ttfPolyDrawProc(OdInt32 nbVertex, const OdGePoint3d* pVertexList, OdInt32 faceListSize, const OdInt32* pFaceList, const OdUInt8* pBezierTypes, const OdGiFaceData* pFaceData = 0) override; /** \details Processes simple polyline data. \param numPoints [in] Number of points. \param vertexList [in] Array of vertices. \param pNormal [in] Pointer to the normal vector. \param pExtrusion [in] Pointer to the extrusion vector. \param baseSubEntMarker [in] Currently unused. \remarks The extrusion vector specifies the direction and distance of the extrusion. \sa */ void polylineProc(OdInt32 numPoints, const OdGePoint3d* vertexList, const OdGeVector3d* pNormal = 0, const OdGeVector3d* pExtrusion = 0, OdGsMarker baseSubEntMarker = -1) override; /* void polygonProc(OdInt32 nbPoints, const OdGePoint3d* pVertexList, const OdGeVector3d* pNormal = 0, const OdGeVector3d* pExtrusion = 0); void circleProc(const OdGePoint3d& center, double radius, const OdGeVector3d& normal, const OdGeVector3d* pExtrusion = 0); void circleProc(const OdGePoint3d&, const OdGePoint3d&, const OdGePoint3d&, const OdGeVector3d* pExtrusion = 0); void circularArcProc(const OdGePoint3d& center, double radius, const OdGeVector3d& normal, const OdGeVector3d& startVector, double sweepAngle, OdGiArcType arcType = kOdGiArcSimple, const OdGeVector3d* pExtrusion = 0); void circularArcProc(const OdGePoint3d& start, const OdGePoint3d& point, const OdGePoint3d& end, OdGiArcType arcType = kOdGiArcSimple, const OdGeVector3d* pExtrusion = 0); void ellipArcProc(OdGiConveyorContext* pDrawCtx, const OdGeEllipArc3d& arc, const OdGePoint3d* pEndPointsOverrides = 0, OdGiArcType arcType = kOdGiArcSimple, const OdGeVector3d* pExtrusion = 0); void nurbsProc(const OdGeNurbCurve3d& nurbs); void shapeProc(const OdGePoint3d& position, const OdGeVector3d& u, const OdGeVector3d& v, int shapeNo, const OdGiTextStyle* pStyle, const OdGeVector3d* pExtrusion = 0); */ /** \details Processes mesh data. \param numRows [in] Number of rows. \param numColumns [in] Number of columns. \param vertexList [in] Array of vertices. \param pEdgeData [in] Pointer to additional edge data. \param pFaceData [in] Pointer to additional face data. \param pVertexData [in] Pointer to additional vertex data. \sa */ void meshProc(OdInt32 numRows, OdInt32 numColumns, const OdGePoint3d* vertexList, const OdGiEdgeData* pEdgeData = 0, const OdGiFaceData* pFaceData = 0, const OdGiVertexData* pVertexData = 0) override; /** \details Processes shell data. \param numVertices [in] Number of vertices. \param vertexList [in] Array of vertices. \param faceListSize [in] Number of entries in faceList. \param faceList [in] Array of numbers that define the faces. \param pEdgeData [in] Pointer to additional edge data. \param pFaceData [in] Pointer to additional face data. \param pVertexData [in] Pointer to additional vertex data. \sa */ void shellProc(OdInt32 numVertices, const OdGePoint3d* vertexList, OdInt32 faceListSize, const OdInt32* faceList, const OdGiEdgeData* pEdgeData = 0, const OdGiFaceData* pFaceData = 0, const OdGiVertexData* pVertexData = 0) override; #if !defined(_WIN32_WCE) void textProcEx(const OdGePoint3d& position, const OdGeVector3d& u, const OdGeVector3d& v, const OdString &msg, const OdIntArray &ulFlags, const OdGiTextStyle* pTextStyle, OdGeVector3d originalSize); static OdString textProcExEmbedRawData(const OdString &msg, const OdIntArray &ulFlags, int *length = NULL, bool *raw = NULL); #endif /** \details Processes raster images data. \param origin [in] Lower-left corner. \param u [in] Image width vector. \param v [in] Image height vector. \param pImage [in] Pointer to the RasterImage object. \param uvBoundary [in] Array of image boundary points (may not be null). \param numBoundPts [in] Number of boundary points. \param transparency [in] True if and only if image transparency is on. \param brightness [in] Image brightness [0.0 .. 100.0]. \param contrast [in] Image contrast [0.0 .. 100.0]. \param fade [in] Image fade value [0.0 .. 100.0]. \sa */ void rasterImageProc( const OdGePoint3d& origin, const OdGeVector3d& u, const OdGeVector3d& v, const OdGiRasterImage* pImage, const OdGePoint2d* uvBoundary, OdUInt32 numBoundPts, bool transparency = false, double brightness = 50.0, double contrast = 50.0, double fade = 0.0) override; /** \details Processes metafile data. \param origin [in] Metafile origin. \param u [in] Metafile width vector. \param v [in] Metafile height vector. \param pMetafile [in] Pointer to the metafile object. \param dcAligned [in] Reserved. \param allowClipping [in] Reserved. */ void metafileProc( const OdGePoint3d& origin, const OdGeVector3d& u, const OdGeVector3d& v, const OdGiMetafile* pMetafile, bool dcAligned = true, bool allowClipping = false) override; /** \details Passes to the visualization framework an object that can visualize itself. \param context [in] Drawing context. \param origin [in] Object origin. \param u [in] Object width vector. \param v [in] Object height vector. \param pDrawable [in] Pointer to the drawable. \param dcAligned [in] Reserved. \param allowClipping [in] Reserved. \remarks The visualization framework uses this function to visualize Ole2Frame entities. \remarks ownerDrawDc is not conveyor primitive, so the ODA visualization framework performs no processing (transformation, linetyping, or clipping) for this object. All coordinates are in Model coordinates. */ void ownerDrawDc( const OdGiCommonDraw& context, const OdGePoint3d& origin, const OdGeVector3d& u, const OdGeVector3d& v, const OdGiSelfGdiDrawable* pDrawable, bool dcAligned = true, bool allowClipping = false); /** \details Processes polypoint data. \param numPoints [in] Number of points. \param vertexList [in] Pointer to an array of vertices. \param pColors [in] Pointer to point colors. \param pTransparency [in] Pointer to point transparency. \param pNormals [in] Array of normal vectors. \param pExtrusions [in] Array of vectors defining extrusions. \param pSubEntMarkers [in] Array of sub-entity markers. \param nPointSize [in] Points size. */ void polypointProc(OdInt32 numPoints, const OdGePoint3d* vertexList, const OdCmEntityColor* pColors, const OdCmTransparency* pTransparency = 0, const OdGeVector3d* pNormals = 0, const OdGeVector3d* pExtrusions = 0, const OdGsMarker* pSubEntMarkers = 0, OdInt32 nPointSize = 0) override; protected: #ifndef _WIN32_WCE bool alphaSolidShellOut( OdInt32 numVertices, const OdGePoint3d* vertexList, OdInt32 faceListSize, const OdInt32* faceList, const OdGiEdgeData* pEdgeData = 0, const OdGiFaceData* pFaceData = 0, const OdGiVertexData* pVertexData = 0 ); void solidTriangleOut( const OdInt32* vertices, const OdGeVector3d* pNormal ); #endif //_WIN32_WCE }; #include "TD_PackPop.h" #endif //#ifndef _EXGSGDIGEOMETRY_H_INCLUDED_