00001 /* AbiWord 00002 * Copyright (C) 1998 AbiSource, Inc. 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00017 * 02111-1307, USA. 00018 */ 00019 00020 #ifndef GR_VECTORIMAGE_H 00021 #define GR_VECTORIMAGE_H 00022 00023 #include "ut_types.h" 00024 #include "gr_Image.h" 00025 00026 #include "ut_xml.h" 00027 #include "ut_vector.h" 00028 00029 class UT_svg; 00030 class UT_SVGMatrix; 00031 class GR_Graphics; 00032 00033 class ABI_EXPORT GR_VectorImage : public GR_Image 00034 { 00035 public: 00036 GR_VectorImage(const char* szName); 00037 virtual ~GR_VectorImage(); 00038 00039 virtual bool convertToBuffer(UT_ByteBuf** ppBB) const; 00040 virtual bool convertFromBuffer(const UT_ByteBuf* pBB, UT_sint32 iDisplayWidth, UT_sint32 iDisplayHeight); 00041 00042 virtual GR_Image * createImageSegment(GR_Graphics * /*pG*/, 00043 const UT_Rect & /*rec*/) 00044 { UT_ASSERT_NOT_REACHED() ; return NULL; } 00045 00046 virtual GRType getType() const { return GRT_Vector; } 00047 virtual bool render(GR_Graphics *pGR, UT_sint32 iDisplayWidth, UT_sint32 iDisplayHeight); 00048 virtual bool hasAlpha(void) const; 00049 virtual bool isTransparentAt(UT_sint32 x, UT_sint32 y); 00050 00051 00052 private: 00053 bool m_status; 00054 00055 UT_sint32 m_iDisplayOx; 00056 UT_sint32 m_iDisplayOy; 00057 00058 UT_svg *m_pSVG; 00059 UT_ByteBuf *m_pBB_Image; 00060 public: 00061 UT_sint32 getDisplayOx() const { return m_iDisplayOx; } 00062 UT_sint32 getDisplayOy() const { return m_iDisplayOy; } 00063 00064 UT_svg *getSVG() const { return m_pSVG; } 00065 00066 UT_sint32 m_iTreeLevel; 00067 UT_GenericVector<UT_SVGMatrix*> m_SVG_Matrix; 00068 UT_SVGMatrix *m_CurrentMatrix; 00069 }; 00070 00071 #endif /* GR_VECTORIMAGE */
1.5.5