/////////////////////////////////////////////////////////////////////////////// // 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. /////////////////////////////////////////////////////////////////////////////// // // OdOpticaFieldData TX Library // #ifndef OD_OPTICAL_INCLUDED #define OD_OPTICAL_INCLUDED #include "TD_PackPush.h" #include "OdOpticalExports.h" #include "DbObject.h" #include "Ge/GeScale2d.h" #include "OdBinaryData.h" #include "Gi/GiRasterWrappers.h" #include "Gs/Gs.h" class OPTICAL_EXPORT OdFdOpticalFieldData : public OdDbObject { public: enum SPARQCode { k_None = 0, k_Email, k_Telephone, k_vCard, k_mCard, k_ShortMessageService, k_MultimediaMessageService, k_Geolocation }; protected: // in properties : bool m_bScannable; // Optically Scannable // Draw the text as an optically scannable image SPARQCode m_enHint; // Optical Hint // Specifies a SPARQCode hint for the image OdGeScale2d m_scale; // Optical Image Size // The size of the optically scannable image mutable OdString m_sQrCodeText; // in DWG stream only mutable OdUInt64 m_QrCodeKey; // 0 is missing // ZXing::Matrix or ZXing::BitMatrix data with barcode mutable OdUInt32 m_dataWidth, m_dataHeight; // m_dataWidth * m_dataHeight * 4 - is size of raster data mutable OdBinaryData m_data; mutable OdSharedPtr m_pImage; OdFdOpticalFieldData(); public: ODDB_DECLARE_MEMBERS(OdFdOpticalFieldData); // Declare default functions. It is necessary for all Drawings database objects. virtual ~OdFdOpticalFieldData(); // --- OdDbObject : --- virtual OdResult dwgInFields(OdDbDwgFiler* pFiler); virtual void dwgOutFields(OdDbDwgFiler* pFiler) const; virtual OdResult dxfInFields(OdDbDxfFiler* pFiler); virtual void dxfOutFields(OdDbDxfFiler* pFiler) const; virtual bool subWorldDraw(OdGiWorldDraw* pWd) const; /////////////////////////////////////////////////////////////////// double height() const; double width() const; double size() const; enum SPARQCode SPARQCodeHint() const; bool isEnabled() const; //OdResult setHeight(double height); //OdResult setWidth(double width); OdResult setSize(double size); OdResult setSPARQCodeHint(enum SPARQCode code); void setEnabled(bool val); bool testImage() const; void setModified(); //void setImage(wchar_t const * __ptr64, class OdGiImageBGRA32 const & __ptr64); static OdDbObjectId createOpticalDataForObject(OdDbObject* pObj); static OdDbObjectId opticalDataForObject(const OdDbObject* pObj); static bool isStringOpticallyScannable(const OdString& sText, enum SPARQCode code); }; /** \details This template class is a specialization of the OdSmartPtr class for OdFdOpticalFieldData object pointers. */ typedef OdSmartPtr OdFdOpticalFieldDataPtr; #include "TD_PackPop.h" #endif // OD_OPTICAL_INCLUDED