/////////////////////////////////////////////////////////////////////////////// // 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 _NW_PLOTTEXTSTYLE_H_ #define _NW_PLOTTEXTSTYLE_H_ #include "NwObject.h" #include "NwPlotEnums.h" class OdNwPlotPathFigure; typedef OdSmartPtr OdNwPlotPathFigurePtr; class OdNwPlotBrush; typedef OdSmartPtr OdNwPlotBrushPtr; class OdGeMatrix2d; /** \details This class represents geometry. */ class NWDBEXPORT OdNwPlotTextStyle : public OdNwObject { ODRX_DECLARE_MEMBERS(OdNwPlotTextStyle); /** \details Default constructor. Creates an OdNwPlotTextStyle object. */ OdNwPlotTextStyle(); public: /** \details Virtual destructor. Frees allocated resources. */ virtual ~OdNwPlotTextStyle(); public: /** \details Returns the 'em' height of the text in model units. \returns A double precision floating-point value of 'em' font height. */ double getTextEmHeight() const; /** \details Returns the character spacing of the text style, using ACW (average character width). \returns A double precision floating-point value of the character spacing. */ double getCharacterSpacing() const; /** \details Returns the rotation of the text style. \returns A double precision floating-point value of rotation in radians. */ double getRotation() const; /** \details Returns the horizontal alignment relative to the insertion point. \returns Enumeration of the horizontal alignment. */ NwPlotTextHorizontalAlignment::Enum getHorizontalAlignment() const; /** \details Returns the vertical alignment relative to the insertion point. \returns Enumeration of the vertical alignment. */ NwPlotTextVerticalAlignment::Enum getVerticalAlignment() const; /** \details Indicates if the text is vertical. \returns A boolean flag the font is vertical. */ bool getIsSideways() const; /** \details Indicates if the text is right-to-left. \returns A boolean flag the font is right-to-left. */ bool getIsRightToLeft() const; /** \details Indicates if the text is outline text. \returns A boolean flag the text is an outline text. */ bool getOutline() const; /** \details Returns the 2D transformation matrix for the text. \returns OdGeMatrix2d object with transformation matrix. */ OdGeMatrix2d getTransform() const; /** \details Returns the opacity factor of the text. \returns A double precision floating-point value of opacity factor where 0.0 means the text is transparent and 1.0 if the text is opaque. */ double getOpacityFactor() const; /** \details Returns a brush as the brush for the opacity mask. \returns OdNwPlotBrushPtr object with opacity mask. */ OdNwPlotBrushPtr getOpacityMask() const; /** \details Returns the clip bounds. \returns Array with OdNwPlotPathFigurePtr objects with clipping geometry. */ OdArray getClipGeometry() const; /** \details Returns an object ID of the filling brush for the text. \returns OdNwObjectId object of the filling brush. */ OdNwObjectId getFill() const; }; /** \details This template class is a specialization of the OdSmartPtr class for OdNwPlotTextStyle object pointers. */ typedef OdSmartPtr OdNwPlotTextStylePtr; #endif // _NW_PLOTTEXTSTYLE_H_