bump product version to 4.2.0.1
[LibreOffice.git] / include / vcl / metaact.hxx
blobc61c8a60b66411152cd5b6ba7daf1ca16bf8783e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_VCL_METAACT_HXX
21 #define INCLUDED_VCL_METAACT_HXX
23 #include <vcl/dllapi.h>
24 #include <vcl/gradient.hxx>
25 #include <vcl/hatch.hxx>
26 #include <vcl/wall.hxx>
27 #include <vcl/font.hxx>
28 #include <tools/poly.hxx>
29 #include <vcl/bitmap.hxx>
30 #include <vcl/bitmapex.hxx>
31 #include <vcl/region.hxx>
32 #include <vcl/graph.hxx>
33 #include <vcl/outdev.hxx>
34 #include <vcl/gdimtf.hxx>
35 #include <vcl/gfxlink.hxx>
36 #include <vcl/lineinfo.hxx>
38 class SvStream;
40 #define META_NULL_ACTION (0)
41 #define META_PIXEL_ACTION (100)
42 #define META_POINT_ACTION (101)
43 #define META_LINE_ACTION (102)
44 #define META_RECT_ACTION (103)
45 #define META_ROUNDRECT_ACTION (104)
46 #define META_ELLIPSE_ACTION (105)
47 #define META_ARC_ACTION (106)
48 #define META_PIE_ACTION (107)
49 #define META_CHORD_ACTION (108)
50 #define META_POLYLINE_ACTION (109)
51 #define META_POLYGON_ACTION (110)
52 #define META_POLYPOLYGON_ACTION (111)
53 #define META_TEXT_ACTION (112)
54 #define META_TEXTARRAY_ACTION (113)
55 #define META_STRETCHTEXT_ACTION (114)
56 #define META_TEXTRECT_ACTION (115)
57 #define META_BMP_ACTION (116)
58 #define META_BMPSCALE_ACTION (117)
59 #define META_BMPSCALEPART_ACTION (118)
60 #define META_BMPEX_ACTION (119)
61 #define META_BMPEXSCALE_ACTION (120)
62 #define META_BMPEXSCALEPART_ACTION (121)
63 #define META_MASK_ACTION (122)
64 #define META_MASKSCALE_ACTION (123)
65 #define META_MASKSCALEPART_ACTION (124)
66 #define META_GRADIENT_ACTION (125)
67 #define META_HATCH_ACTION (126)
68 #define META_WALLPAPER_ACTION (127)
69 #define META_CLIPREGION_ACTION (128)
70 #define META_ISECTRECTCLIPREGION_ACTION (129)
71 #define META_ISECTREGIONCLIPREGION_ACTION (130)
72 #define META_MOVECLIPREGION_ACTION (131)
73 #define META_LINECOLOR_ACTION (132)
74 #define META_FILLCOLOR_ACTION (133)
75 #define META_TEXTCOLOR_ACTION (134)
76 #define META_TEXTFILLCOLOR_ACTION (135)
77 #define META_TEXTALIGN_ACTION (136)
78 #define META_MAPMODE_ACTION (137)
79 #define META_FONT_ACTION (138)
80 #define META_PUSH_ACTION (139)
81 #define META_POP_ACTION (140)
82 #define META_RASTEROP_ACTION (141)
83 #define META_TRANSPARENT_ACTION (142)
84 #define META_EPS_ACTION (143)
85 #define META_REFPOINT_ACTION (144)
86 #define META_TEXTLINECOLOR_ACTION (145)
87 #define META_TEXTLINE_ACTION (146)
88 #define META_FLOATTRANSPARENT_ACTION (147)
89 #define META_GRADIENTEX_ACTION (148)
90 #define META_LAYOUTMODE_ACTION (149)
91 #define META_TEXTLANGUAGE_ACTION (150)
92 #define META_OVERLINECOLOR_ACTION (151)
94 #define META_COMMENT_ACTION (512)
96 struct ImplMetaReadData
98 rtl_TextEncoding meActualCharSet;
100 ImplMetaReadData() :
101 meActualCharSet( RTL_TEXTENCODING_ASCII_US )
106 struct ImplMetaWriteData
108 rtl_TextEncoding meActualCharSet;
110 ImplMetaWriteData() :
111 meActualCharSet( RTL_TEXTENCODING_ASCII_US )
116 #define DECL_META_ACTION( Name, nType ) \
117 Meta##Name##Action(); \
118 protected: \
119 virtual ~Meta##Name##Action(); \
120 public: \
121 virtual void Execute( OutputDevice* pOut ); \
122 virtual MetaAction* Clone(); \
123 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData ); \
124 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData );
126 #define IMPL_META_ACTION( Name, nType ) \
127 Meta##Name##Action::Meta##Name##Action() : \
128 MetaAction( nType ) {} \
129 Meta##Name##Action::~Meta##Name##Action() {}
131 class VCL_DLLPUBLIC MetaAction
133 private:
134 sal_uLong mnRefCount;
135 sal_uInt16 mnType;
137 virtual sal_Bool Compare( const MetaAction& ) const;
139 protected:
140 virtual ~MetaAction();
142 public:
143 MetaAction();
144 explicit MetaAction( sal_uInt16 nType );
146 virtual void Execute( OutputDevice* pOut );
148 virtual MetaAction* Clone();
150 virtual void Move( long nHorzMove, long nVertMove );
151 virtual void Scale( double fScaleX, double fScaleY );
153 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData );
154 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData );
156 sal_uInt16 GetType() const { return mnType; }
157 sal_uLong GetRefCount() const { return mnRefCount; }
158 void ResetRefCount() { mnRefCount = 1; }
159 void Duplicate() { mnRefCount++; }
160 void Delete() { if ( 0 == --mnRefCount ) delete this; }
162 public:
163 static MetaAction* ReadMetaAction( SvStream& rIStm, ImplMetaReadData* pData );
166 class VCL_DLLPUBLIC MetaPixelAction : public MetaAction
168 private:
169 Point maPt;
170 Color maColor;
172 virtual sal_Bool Compare( const MetaAction& ) const;
174 public:
175 DECL_META_ACTION( Pixel, META_PIXEL_ACTION )
177 MetaPixelAction( const Point& rPt, const Color& rColor );
179 virtual void Move( long nHorzMove, long nVertMove );
180 virtual void Scale( double fScaleX, double fScaleY );
182 const Point& GetPoint() const { return maPt; }
183 const Color& GetColor() const { return maColor; }
186 class VCL_DLLPUBLIC MetaPointAction : public MetaAction
188 private:
189 Point maPt;
191 virtual sal_Bool Compare( const MetaAction& ) const;
193 public:
194 DECL_META_ACTION( Point, META_POINT_ACTION )
196 explicit MetaPointAction( const Point& );
198 virtual void Move( long nHorzMove, long nVertMove );
199 virtual void Scale( double fScaleX, double fScaleY );
201 const Point& GetPoint() const { return maPt; }
204 class VCL_DLLPUBLIC MetaLineAction : public MetaAction
206 private:
208 LineInfo maLineInfo;
209 Point maStartPt;
210 Point maEndPt;
212 virtual sal_Bool Compare( const MetaAction& ) const;
214 public:
215 DECL_META_ACTION( Line, META_LINE_ACTION )
217 MetaLineAction( const Point& rStart, const Point& rEnd );
218 MetaLineAction( const Point& rStart, const Point& rEnd,
219 const LineInfo& rLineInfo );
221 virtual void Move( long nHorzMove, long nVertMove );
222 virtual void Scale( double fScaleX, double fScaleY );
224 const Point& GetStartPoint() const { return maStartPt; }
225 const Point& GetEndPoint() const { return maEndPt; }
226 const LineInfo& GetLineInfo() const { return maLineInfo; }
229 class VCL_DLLPUBLIC MetaRectAction : public MetaAction
231 private:
233 Rectangle maRect;
235 virtual sal_Bool Compare( const MetaAction& ) const;
236 public:
237 DECL_META_ACTION( Rect, META_RECT_ACTION )
239 explicit MetaRectAction( const Rectangle& );
241 virtual void Move( long nHorzMove, long nVertMove );
242 virtual void Scale( double fScaleX, double fScaleY );
244 const Rectangle& GetRect() const { return maRect; }
247 class VCL_DLLPUBLIC MetaRoundRectAction : public MetaAction
249 private:
251 Rectangle maRect;
252 sal_uInt32 mnHorzRound;
253 sal_uInt32 mnVertRound;
255 virtual sal_Bool Compare( const MetaAction& ) const;
257 public:
258 DECL_META_ACTION( RoundRect, META_ROUNDRECT_ACTION )
260 MetaRoundRectAction( const Rectangle& rRect,
261 sal_uInt32 nHorzRound, sal_uInt32 nVertRound );
263 virtual void Move( long nHorzMove, long nVertMove );
264 virtual void Scale( double fScaleX, double fScaleY );
266 const Rectangle& GetRect() const { return maRect; }
267 sal_uInt32 GetHorzRound() const { return mnHorzRound; }
268 sal_uInt32 GetVertRound() const { return mnVertRound; }
271 class VCL_DLLPUBLIC MetaEllipseAction : public MetaAction
273 private:
275 Rectangle maRect;
277 virtual sal_Bool Compare( const MetaAction& ) const;
279 public:
280 DECL_META_ACTION( Ellipse, META_ELLIPSE_ACTION )
282 explicit MetaEllipseAction( const Rectangle& );
284 virtual void Move( long nHorzMove, long nVertMove );
285 virtual void Scale( double fScaleX, double fScaleY );
287 const Rectangle& GetRect() const { return maRect; }
290 class VCL_DLLPUBLIC MetaArcAction : public MetaAction
292 private:
294 Rectangle maRect;
295 Point maStartPt;
296 Point maEndPt;
298 virtual sal_Bool Compare( const MetaAction& ) const;
300 public:
301 DECL_META_ACTION( Arc, META_ARC_ACTION )
303 MetaArcAction( const Rectangle& rRect,
304 const Point& rStart, const Point& rEnd );
306 virtual void Move( long nHorzMove, long nVertMove );
307 virtual void Scale( double fScaleX, double fScaleY );
309 const Rectangle& GetRect() const { return maRect; }
310 const Point& GetStartPoint() const { return maStartPt; }
311 const Point& GetEndPoint() const { return maEndPt; }
314 class VCL_DLLPUBLIC MetaPieAction : public MetaAction
316 private:
318 Rectangle maRect;
319 Point maStartPt;
320 Point maEndPt;
322 virtual sal_Bool Compare( const MetaAction& ) const;
324 public:
325 DECL_META_ACTION( Pie, META_PIE_ACTION )
327 MetaPieAction( const Rectangle& rRect,
328 const Point& rStart, const Point& rEnd );
330 virtual void Move( long nHorzMove, long nVertMove );
331 virtual void Scale( double fScaleX, double fScaleY );
333 const Rectangle& GetRect() const { return maRect; }
334 const Point& GetStartPoint() const { return maStartPt; }
335 const Point& GetEndPoint() const { return maEndPt; }
338 class VCL_DLLPUBLIC MetaChordAction : public MetaAction
340 private:
342 Rectangle maRect;
343 Point maStartPt;
344 Point maEndPt;
346 virtual sal_Bool Compare( const MetaAction& ) const;
348 public:
349 DECL_META_ACTION( Chord, META_CHORD_ACTION )
351 MetaChordAction( const Rectangle& rRect,
352 const Point& rStart, const Point& rEnd );
354 virtual void Move( long nHorzMove, long nVertMove );
355 virtual void Scale( double fScaleX, double fScaleY );
357 const Rectangle& GetRect() const { return maRect; }
358 const Point& GetStartPoint() const { return maStartPt; }
359 const Point& GetEndPoint() const { return maEndPt; }
362 class VCL_DLLPUBLIC MetaPolyLineAction : public MetaAction
364 private:
366 LineInfo maLineInfo;
367 Polygon maPoly;
369 virtual sal_Bool Compare( const MetaAction& ) const;
371 public:
372 DECL_META_ACTION( PolyLine, META_POLYLINE_ACTION )
374 explicit MetaPolyLineAction( const Polygon& );
375 explicit MetaPolyLineAction( const Polygon&, const LineInfo& );
377 virtual void Move( long nHorzMove, long nVertMove );
378 virtual void Scale( double fScaleX, double fScaleY );
380 const Polygon& GetPolygon() const { return maPoly; }
381 const LineInfo& GetLineInfo() const { return maLineInfo; }
384 class VCL_DLLPUBLIC MetaPolygonAction : public MetaAction
386 private:
388 Polygon maPoly;
390 virtual sal_Bool Compare( const MetaAction& ) const;
392 public:
393 DECL_META_ACTION( Polygon, META_POLYGON_ACTION )
395 explicit MetaPolygonAction( const Polygon& );
397 virtual void Move( long nHorzMove, long nVertMove );
398 virtual void Scale( double fScaleX, double fScaleY );
400 const Polygon& GetPolygon() const { return maPoly; }
403 class VCL_DLLPUBLIC MetaPolyPolygonAction : public MetaAction
405 private:
407 PolyPolygon maPolyPoly;
409 virtual sal_Bool Compare( const MetaAction& ) const;
411 public:
412 DECL_META_ACTION( PolyPolygon, META_POLYPOLYGON_ACTION )
414 explicit MetaPolyPolygonAction( const PolyPolygon& );
416 virtual void Move( long nHorzMove, long nVertMove );
417 virtual void Scale( double fScaleX, double fScaleY );
419 const PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
422 class VCL_DLLPUBLIC MetaTextAction : public MetaAction
424 private:
426 Point maPt;
427 OUString maStr;
428 sal_uInt16 mnIndex;
429 sal_uInt16 mnLen;
431 virtual sal_Bool Compare( const MetaAction& ) const;
433 public:
434 DECL_META_ACTION( Text, META_TEXT_ACTION )
436 MetaTextAction( const Point& rPt, const OUString& rStr,
437 sal_uInt16 nIndex, sal_uInt16 nLen );
439 virtual void Move( long nHorzMove, long nVertMove );
440 virtual void Scale( double fScaleX, double fScaleY );
442 const Point& GetPoint() const { return maPt; }
443 const OUString& GetText() const { return maStr; }
444 sal_uInt16 GetIndex() const { return mnIndex; }
445 sal_uInt16 GetLen() const { return mnLen; }
448 class VCL_DLLPUBLIC MetaTextArrayAction : public MetaAction
450 private:
452 Point maStartPt;
453 OUString maStr;
454 sal_Int32* mpDXAry;
455 sal_uInt16 mnIndex;
456 sal_uInt16 mnLen;
458 virtual sal_Bool Compare( const MetaAction& ) const;
460 protected:
461 virtual ~MetaTextArrayAction();
463 public:
464 MetaTextArrayAction();
465 MetaTextArrayAction( const MetaTextArrayAction& rAction );
466 MetaTextArrayAction( const Point& rStartPt, const OUString& rStr,
467 const sal_Int32* pDXAry, sal_uInt16 nIndex,
468 sal_uInt16 nLen );
470 virtual void Execute( OutputDevice* pOut );
472 virtual MetaAction* Clone();
474 virtual void Move( long nHorzMove, long nVertMove );
475 virtual void Scale( double fScaleX, double fScaleY );
477 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData );
478 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData );
480 const Point& GetPoint() const { return maStartPt; }
481 const OUString& GetText() const { return maStr; }
482 sal_uInt16 GetIndex() const { return mnIndex; }
483 sal_uInt16 GetLen() const { return mnLen; }
484 sal_Int32* GetDXArray() const { return mpDXAry; }
487 class VCL_DLLPUBLIC MetaStretchTextAction : public MetaAction
489 private:
491 Point maPt;
492 OUString maStr;
493 sal_uInt32 mnWidth;
494 sal_uInt16 mnIndex;
495 sal_uInt16 mnLen;
497 virtual sal_Bool Compare( const MetaAction& ) const;
499 public:
500 DECL_META_ACTION( StretchText, META_STRETCHTEXT_ACTION )
502 MetaStretchTextAction( const Point& rPt, sal_uInt32 nWidth,
503 const OUString& rStr,
504 sal_uInt16 nIndex, sal_uInt16 nLen );
506 virtual void Move( long nHorzMove, long nVertMove );
507 virtual void Scale( double fScaleX, double fScaleY );
509 const Point& GetPoint() const { return maPt; }
510 const OUString& GetText() const { return maStr; }
511 sal_uInt32 GetWidth() const { return mnWidth; }
512 sal_uInt16 GetIndex() const { return mnIndex; }
513 sal_uInt16 GetLen() const { return mnLen; }
516 class VCL_DLLPUBLIC MetaTextRectAction : public MetaAction
518 private:
520 Rectangle maRect;
521 OUString maStr;
522 sal_uInt16 mnStyle;
524 virtual sal_Bool Compare( const MetaAction& ) const;
526 public:
527 DECL_META_ACTION( TextRect, META_TEXTRECT_ACTION )
529 MetaTextRectAction( const Rectangle& rRect,
530 const OUString& rStr, sal_uInt16 nStyle );
532 virtual void Move( long nHorzMove, long nVertMove );
533 virtual void Scale( double fScaleX, double fScaleY );
535 const Rectangle& GetRect() const { return maRect; }
536 const OUString& GetText() const { return maStr; }
537 sal_uInt16 GetStyle() const { return mnStyle; }
540 class VCL_DLLPUBLIC MetaTextLineAction : public MetaAction
542 private:
544 Point maPos;
545 long mnWidth;
546 FontStrikeout meStrikeout;
547 FontUnderline meUnderline;
548 FontUnderline meOverline;
550 virtual sal_Bool Compare( const MetaAction& ) const;
552 public:
553 DECL_META_ACTION( TextLine, META_TEXTLINE_ACTION )
555 MetaTextLineAction( const Point& rPos, long nWidth,
556 FontStrikeout eStrikeout,
557 FontUnderline eUnderline,
558 FontUnderline eOverline );
559 virtual void Move( long nHorzMove, long nVertMove );
560 virtual void Scale( double fScaleX, double fScaleY );
562 const Point& GetStartPoint() const { return maPos; }
563 long GetWidth() const { return mnWidth; }
564 FontStrikeout GetStrikeout() const { return meStrikeout; }
565 FontUnderline GetUnderline() const { return meUnderline; }
566 FontUnderline GetOverline() const { return meOverline; }
569 class VCL_DLLPUBLIC MetaBmpAction : public MetaAction
571 private:
573 Bitmap maBmp;
574 Point maPt;
576 virtual sal_Bool Compare( const MetaAction& ) const;
578 public:
579 DECL_META_ACTION( Bmp, META_BMP_ACTION )
581 MetaBmpAction( const Point& rPt, const Bitmap& rBmp );
583 virtual void Move( long nHorzMove, long nVertMove );
584 virtual void Scale( double fScaleX, double fScaleY );
586 const Bitmap& GetBitmap() const { return maBmp; }
587 const Point& GetPoint() const { return maPt; }
590 class VCL_DLLPUBLIC MetaBmpScaleAction : public MetaAction
592 private:
594 Bitmap maBmp;
595 Point maPt;
596 Size maSz;
598 virtual sal_Bool Compare( const MetaAction& ) const;
600 public:
601 DECL_META_ACTION( BmpScale, META_BMPSCALE_ACTION )
603 MetaBmpScaleAction( const Point& rPt, const Size& rSz,
604 const Bitmap& rBmp );
606 virtual void Move( long nHorzMove, long nVertMove );
607 virtual void Scale( double fScaleX, double fScaleY );
609 const Bitmap& GetBitmap() const { return maBmp; }
610 const Point& GetPoint() const { return maPt; }
611 const Size& GetSize() const { return maSz; }
614 class VCL_DLLPUBLIC MetaBmpScalePartAction : public MetaAction
616 private:
618 Bitmap maBmp;
619 Point maDstPt;
620 Size maDstSz;
621 Point maSrcPt;
622 Size maSrcSz;
624 virtual sal_Bool Compare( const MetaAction& ) const;
626 public:
627 DECL_META_ACTION( BmpScalePart, META_BMPSCALEPART_ACTION )
629 MetaBmpScalePartAction( const Point& rDstPt, const Size& rDstSz,
630 const Point& rSrcPt, const Size& rSrcSz,
631 const Bitmap& rBmp );
633 virtual void Move( long nHorzMove, long nVertMove );
634 virtual void Scale( double fScaleX, double fScaleY );
636 const Bitmap& GetBitmap() const { return maBmp; }
637 const Point& GetDestPoint() const { return maDstPt; }
638 const Size& GetDestSize() const { return maDstSz; }
639 const Point& GetSrcPoint() const { return maSrcPt; }
640 const Size& GetSrcSize() const { return maSrcSz; }
643 class VCL_DLLPUBLIC MetaBmpExAction : public MetaAction
645 private:
647 BitmapEx maBmpEx;
648 Point maPt;
650 virtual sal_Bool Compare( const MetaAction& ) const;
652 public:
653 DECL_META_ACTION( BmpEx, META_BMPEX_ACTION )
655 MetaBmpExAction( const Point& rPt, const BitmapEx& rBmpEx );
657 virtual void Move( long nHorzMove, long nVertMove );
658 virtual void Scale( double fScaleX, double fScaleY );
660 const BitmapEx& GetBitmapEx() const { return maBmpEx; }
661 const Point& GetPoint() const { return maPt; }
664 class VCL_DLLPUBLIC MetaBmpExScaleAction : public MetaAction
666 private:
668 BitmapEx maBmpEx;
669 Point maPt;
670 Size maSz;
672 virtual sal_Bool Compare( const MetaAction& ) const;
674 public:
675 DECL_META_ACTION( BmpExScale, META_BMPEXSCALE_ACTION )
677 MetaBmpExScaleAction( const Point& rPt, const Size& rSz,
678 const BitmapEx& rBmpEx ) ;
680 virtual void Move( long nHorzMove, long nVertMove );
681 virtual void Scale( double fScaleX, double fScaleY );
683 const BitmapEx& GetBitmapEx() const { return maBmpEx; }
684 const Point& GetPoint() const { return maPt; }
685 const Size& GetSize() const { return maSz; }
688 class VCL_DLLPUBLIC MetaBmpExScalePartAction : public MetaAction
690 private:
692 BitmapEx maBmpEx;
693 Point maDstPt;
694 Size maDstSz;
695 Point maSrcPt;
696 Size maSrcSz;
698 virtual sal_Bool Compare( const MetaAction& ) const;
700 public:
701 DECL_META_ACTION( BmpExScalePart, META_BMPEXSCALEPART_ACTION )
703 MetaBmpExScalePartAction( const Point& rDstPt, const Size& rDstSz,
704 const Point& rSrcPt, const Size& rSrcSz,
705 const BitmapEx& rBmpEx );
707 virtual void Move( long nHorzMove, long nVertMove );
708 virtual void Scale( double fScaleX, double fScaleY );
710 const BitmapEx& GetBitmapEx() const { return maBmpEx; }
711 const Point& GetDestPoint() const { return maDstPt; }
712 const Size& GetDestSize() const { return maDstSz; }
713 const Point& GetSrcPoint() const { return maSrcPt; }
714 const Size& GetSrcSize() const { return maSrcSz; }
717 class VCL_DLLPUBLIC MetaMaskAction : public MetaAction
719 private:
721 Bitmap maBmp;
722 Color maColor;
723 Point maPt;
725 virtual sal_Bool Compare( const MetaAction& ) const;
727 public:
728 DECL_META_ACTION( Mask, META_MASK_ACTION )
730 MetaMaskAction( const Point& rPt,
731 const Bitmap& rBmp,
732 const Color& rColor );
734 virtual void Move( long nHorzMove, long nVertMove );
735 virtual void Scale( double fScaleX, double fScaleY );
737 const Bitmap& GetBitmap() const { return maBmp; }
738 const Color& GetColor() const { return maColor; }
739 const Point& GetPoint() const { return maPt; }
742 class VCL_DLLPUBLIC MetaMaskScaleAction : public MetaAction
744 private:
746 Bitmap maBmp;
747 Color maColor;
748 Point maPt;
749 Size maSz;
751 virtual sal_Bool Compare( const MetaAction& ) const;
753 public:
754 DECL_META_ACTION( MaskScale, META_MASKSCALE_ACTION )
756 MetaMaskScaleAction( const Point& rPt, const Size& rSz,
757 const Bitmap& rBmp,
758 const Color& rColor );
760 virtual void Move( long nHorzMove, long nVertMove );
761 virtual void Scale( double fScaleX, double fScaleY );
763 const Bitmap& GetBitmap() const { return maBmp; }
764 const Color& GetColor() const { return maColor; }
765 const Point& GetPoint() const { return maPt; }
766 const Size& GetSize() const { return maSz; }
769 class VCL_DLLPUBLIC MetaMaskScalePartAction : public MetaAction
771 private:
773 Bitmap maBmp;
774 Color maColor;
775 Point maDstPt;
776 Size maDstSz;
777 Point maSrcPt;
778 Size maSrcSz;
780 virtual sal_Bool Compare( const MetaAction& ) const;
782 public:
783 DECL_META_ACTION( MaskScalePart, META_MASKSCALEPART_ACTION )
785 MetaMaskScalePartAction( const Point& rDstPt, const Size& rDstSz,
786 const Point& rSrcPt, const Size& rSrcSz,
787 const Bitmap& rBmp,
788 const Color& rColor );
790 virtual void Move( long nHorzMove, long nVertMove );
791 virtual void Scale( double fScaleX, double fScaleY );
793 const Bitmap& GetBitmap() const { return maBmp; }
794 const Color& GetColor() const { return maColor; }
795 const Point& GetDestPoint() const { return maDstPt; }
796 const Size& GetDestSize() const { return maDstSz; }
797 const Point& GetSrcPoint() const { return maSrcPt; }
798 const Size& GetSrcSize() const { return maSrcSz; }
801 class VCL_DLLPUBLIC MetaGradientAction : public MetaAction
803 private:
805 Rectangle maRect;
806 Gradient maGradient;
808 virtual sal_Bool Compare( const MetaAction& ) const;
810 public:
811 DECL_META_ACTION( Gradient, META_GRADIENT_ACTION )
813 MetaGradientAction( const Rectangle& rRect, const Gradient& rGradient );
815 virtual void Move( long nHorzMove, long nVertMove );
816 virtual void Scale( double fScaleX, double fScaleY );
818 const Rectangle& GetRect() const { return maRect; }
819 const Gradient& GetGradient() const { return maGradient; }
822 class VCL_DLLPUBLIC MetaGradientExAction : public MetaAction
824 private:
826 PolyPolygon maPolyPoly;
827 Gradient maGradient;
829 virtual sal_Bool Compare( const MetaAction& ) const;
831 public:
832 DECL_META_ACTION( GradientEx, META_GRADIENTEX_ACTION )
834 MetaGradientExAction( const PolyPolygon& rPolyPoly, const Gradient& rGradient );
836 virtual void Move( long nHorzMove, long nVertMove );
837 virtual void Scale( double fScaleX, double fScaleY );
839 const PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
840 const Gradient& GetGradient() const { return maGradient; }
843 class VCL_DLLPUBLIC MetaHatchAction : public MetaAction
845 private:
847 PolyPolygon maPolyPoly;
848 Hatch maHatch;
850 virtual sal_Bool Compare( const MetaAction& ) const;
852 public:
853 DECL_META_ACTION( Hatch, META_HATCH_ACTION )
855 MetaHatchAction( const PolyPolygon& rPolyPoly, const Hatch& rHatch );
857 virtual void Move( long nHorzMove, long nVertMove );
858 virtual void Scale( double fScaleX, double fScaleY );
860 const PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
861 const Hatch& GetHatch() const { return maHatch; }
864 class VCL_DLLPUBLIC MetaWallpaperAction : public MetaAction
866 private:
868 Rectangle maRect;
869 Wallpaper maWallpaper;
871 virtual sal_Bool Compare( const MetaAction& ) const;
873 public:
874 DECL_META_ACTION( Wallpaper, META_WALLPAPER_ACTION )
876 MetaWallpaperAction( const Rectangle& rRect,
877 const Wallpaper& rPaper );
879 virtual void Move( long nHorzMove, long nVertMove );
880 virtual void Scale( double fScaleX, double fScaleY );
882 const Rectangle& GetRect() const { return maRect; }
883 const Wallpaper& GetWallpaper() const { return maWallpaper; }
886 class VCL_DLLPUBLIC MetaClipRegionAction : public MetaAction
888 private:
890 Region maRegion;
891 sal_Bool mbClip;
893 virtual sal_Bool Compare( const MetaAction& ) const;
895 public:
896 DECL_META_ACTION( ClipRegion, META_CLIPREGION_ACTION )
898 MetaClipRegionAction( const Region& rRegion, sal_Bool bClip );
900 virtual void Move( long nHorzMove, long nVertMove );
901 virtual void Scale( double fScaleX, double fScaleY );
903 const Region& GetRegion() const { return maRegion; }
904 sal_Bool IsClipping() const { return mbClip; }
907 class VCL_DLLPUBLIC MetaISectRectClipRegionAction : public MetaAction
909 private:
911 Rectangle maRect;
913 virtual sal_Bool Compare( const MetaAction& ) const;
915 public:
916 DECL_META_ACTION( ISectRectClipRegion, META_ISECTRECTCLIPREGION_ACTION )
918 explicit MetaISectRectClipRegionAction( const Rectangle& );
920 virtual void Move( long nHorzMove, long nVertMove );
921 virtual void Scale( double fScaleX, double fScaleY );
923 const Rectangle& GetRect() const { return maRect; }
926 class VCL_DLLPUBLIC MetaISectRegionClipRegionAction : public MetaAction
928 private:
930 Region maRegion;
932 virtual sal_Bool Compare( const MetaAction& ) const;
934 public:
935 DECL_META_ACTION( ISectRegionClipRegion, META_ISECTREGIONCLIPREGION_ACTION )
937 explicit MetaISectRegionClipRegionAction( const Region& );
939 virtual void Move( long nHorzMove, long nVertMove );
940 virtual void Scale( double fScaleX, double fScaleY );
942 const Region& GetRegion() const { return maRegion; }
945 class VCL_DLLPUBLIC MetaMoveClipRegionAction : public MetaAction
947 private:
949 long mnHorzMove;
950 long mnVertMove;
952 virtual sal_Bool Compare( const MetaAction& ) const;
954 public:
955 DECL_META_ACTION( MoveClipRegion, META_MOVECLIPREGION_ACTION )
957 MetaMoveClipRegionAction( long nHorzMove, long nVertMove );
959 virtual void Scale( double fScaleX, double fScaleY );
961 long GetHorzMove() const { return mnHorzMove; }
962 long GetVertMove() const { return mnVertMove; }
965 class VCL_DLLPUBLIC MetaLineColorAction : public MetaAction
967 private:
969 Color maColor;
970 sal_Bool mbSet;
972 virtual sal_Bool Compare( const MetaAction& ) const;
974 public:
975 DECL_META_ACTION( LineColor, META_LINECOLOR_ACTION )
977 MetaLineColorAction( const Color& rColor, sal_Bool bSet );
979 const Color& GetColor() const { return maColor; }
980 sal_Bool IsSetting() const { return mbSet; }
983 class VCL_DLLPUBLIC MetaFillColorAction : public MetaAction
985 private:
987 Color maColor;
988 sal_Bool mbSet;
990 virtual sal_Bool Compare( const MetaAction& ) const;
992 public:
993 DECL_META_ACTION( FillColor, META_FILLCOLOR_ACTION )
995 MetaFillColorAction( const Color& rColor, sal_Bool bSet );
997 const Color& GetColor() const { return maColor; }
998 sal_Bool IsSetting() const { return mbSet; }
1001 class VCL_DLLPUBLIC MetaTextColorAction : public MetaAction
1003 private:
1005 Color maColor;
1007 virtual sal_Bool Compare( const MetaAction& ) const;
1009 public:
1010 DECL_META_ACTION( TextColor, META_TEXTCOLOR_ACTION )
1012 explicit MetaTextColorAction( const Color& );
1014 const Color& GetColor() const { return maColor; }
1017 class VCL_DLLPUBLIC MetaTextFillColorAction : public MetaAction
1019 private:
1021 Color maColor;
1022 sal_Bool mbSet;
1024 virtual sal_Bool Compare( const MetaAction& ) const;
1026 public:
1027 DECL_META_ACTION( TextFillColor, META_TEXTFILLCOLOR_ACTION )
1029 MetaTextFillColorAction( const Color& rColor, sal_Bool bSet );
1031 const Color& GetColor() const { return maColor; }
1032 sal_Bool IsSetting() const { return mbSet; }
1035 class VCL_DLLPUBLIC MetaTextLineColorAction : public MetaAction
1037 private:
1039 Color maColor;
1040 sal_Bool mbSet;
1042 virtual sal_Bool Compare( const MetaAction& ) const;
1044 public:
1045 DECL_META_ACTION( TextLineColor, META_TEXTLINECOLOR_ACTION )
1047 MetaTextLineColorAction( const Color& rColor, sal_Bool bSet );
1049 const Color& GetColor() const { return maColor; }
1050 sal_Bool IsSetting() const { return mbSet; }
1053 class VCL_DLLPUBLIC MetaOverlineColorAction : public MetaAction
1055 private:
1057 Color maColor;
1058 sal_Bool mbSet;
1060 virtual sal_Bool Compare( const MetaAction& ) const;
1062 public:
1063 DECL_META_ACTION( OverlineColor, META_OVERLINECOLOR_ACTION )
1065 MetaOverlineColorAction( const Color& rColor, sal_Bool bSet );
1067 const Color& GetColor() const { return maColor; }
1068 sal_Bool IsSetting() const { return mbSet; }
1071 class VCL_DLLPUBLIC MetaTextAlignAction : public MetaAction
1073 private:
1075 TextAlign maAlign;
1077 virtual sal_Bool Compare( const MetaAction& ) const;
1079 public:
1080 DECL_META_ACTION( TextAlign, META_TEXTALIGN_ACTION )
1082 explicit MetaTextAlignAction( TextAlign eAlign );
1084 TextAlign GetTextAlign() const { return maAlign; }
1087 class VCL_DLLPUBLIC MetaMapModeAction : public MetaAction
1089 private:
1091 MapMode maMapMode;
1093 virtual sal_Bool Compare( const MetaAction& ) const;
1095 public:
1096 DECL_META_ACTION( MapMode, META_MAPMODE_ACTION )
1098 explicit MetaMapModeAction( const MapMode& );
1100 virtual void Scale( double fScaleX, double fScaleY );
1102 const MapMode& GetMapMode() const { return maMapMode; }
1105 class VCL_DLLPUBLIC MetaFontAction : public MetaAction
1107 private:
1109 Font maFont;
1111 virtual sal_Bool Compare( const MetaAction& ) const;
1113 public:
1114 DECL_META_ACTION( Font, META_FONT_ACTION )
1116 explicit MetaFontAction( const Font& );
1118 virtual void Scale( double fScaleX, double fScaleY );
1120 const Font& GetFont() const { return maFont; }
1123 class VCL_DLLPUBLIC MetaPushAction : public MetaAction
1125 private:
1127 sal_uInt16 mnFlags;
1129 virtual sal_Bool Compare( const MetaAction& ) const;
1131 public:
1132 DECL_META_ACTION( Push, META_PUSH_ACTION )
1134 explicit MetaPushAction( sal_uInt16 nFlags );
1136 sal_uInt16 GetFlags() const { return mnFlags; }
1139 class VCL_DLLPUBLIC MetaPopAction : public MetaAction
1141 public:
1143 DECL_META_ACTION( Pop, META_POP_ACTION )
1146 class VCL_DLLPUBLIC MetaRasterOpAction : public MetaAction
1148 private:
1150 RasterOp meRasterOp;
1152 virtual sal_Bool Compare( const MetaAction& ) const;
1154 public:
1155 DECL_META_ACTION( RasterOp, META_RASTEROP_ACTION )
1157 explicit MetaRasterOpAction( RasterOp eRasterOp );
1159 RasterOp GetRasterOp() const { return meRasterOp; }
1162 class VCL_DLLPUBLIC MetaTransparentAction : public MetaAction
1164 private:
1166 PolyPolygon maPolyPoly;
1167 sal_uInt16 mnTransPercent;
1169 virtual sal_Bool Compare( const MetaAction& ) const;
1171 public:
1172 DECL_META_ACTION( Transparent, META_TRANSPARENT_ACTION )
1174 MetaTransparentAction( const PolyPolygon& rPolyPoly, sal_uInt16 nTransPercent );
1176 virtual void Move( long nHorzMove, long nVertMove );
1177 virtual void Scale( double fScaleX, double fScaleY );
1179 const PolyPolygon& GetPolyPolygon() const { return maPolyPoly; }
1180 sal_uInt16 GetTransparence() const { return mnTransPercent; }
1183 class VCL_DLLPUBLIC MetaFloatTransparentAction : public MetaAction
1185 private:
1187 GDIMetaFile maMtf;
1188 Point maPoint;
1189 Size maSize;
1190 Gradient maGradient;
1192 virtual sal_Bool Compare( const MetaAction& ) const;
1194 public:
1195 DECL_META_ACTION( FloatTransparent, META_FLOATTRANSPARENT_ACTION )
1197 MetaFloatTransparentAction( const GDIMetaFile& rMtf, const Point& rPos,
1198 const Size& rSize, const Gradient& rGradient );
1200 virtual void Move( long nHorzMove, long nVertMove );
1201 virtual void Scale( double fScaleX, double fScaleY );
1203 const GDIMetaFile& GetGDIMetaFile() const { return maMtf; }
1204 const Point& GetPoint() const { return maPoint; }
1205 const Size& GetSize() const { return maSize; }
1206 const Gradient& GetGradient() const { return maGradient; }
1209 class VCL_DLLPUBLIC MetaEPSAction : public MetaAction
1211 private:
1213 GfxLink maGfxLink;
1214 GDIMetaFile maSubst;
1215 Point maPoint;
1216 Size maSize;
1218 virtual sal_Bool Compare( const MetaAction& ) const;
1220 public:
1221 DECL_META_ACTION( EPS, META_EPS_ACTION )
1223 MetaEPSAction( const Point& rPoint, const Size& rSize,
1224 const GfxLink& rGfxLink, const GDIMetaFile& rSubst );
1226 virtual void Move( long nHorzMove, long nVertMove );
1227 virtual void Scale( double fScaleX, double fScaleY );
1229 const GfxLink& GetLink() const { return maGfxLink; }
1230 const GDIMetaFile& GetSubstitute() const { return maSubst; }
1231 const Point& GetPoint() const { return maPoint; }
1232 const Size& GetSize() const { return maSize; }
1235 class VCL_DLLPUBLIC MetaRefPointAction : public MetaAction
1237 private:
1239 Point maRefPoint;
1240 sal_Bool mbSet;
1242 virtual sal_Bool Compare( const MetaAction& ) const;
1244 public:
1245 DECL_META_ACTION( RefPoint, META_REFPOINT_ACTION )
1247 MetaRefPointAction( const Point& rRefPoint, sal_Bool bSet );
1249 const Point& GetRefPoint() const { return maRefPoint; }
1250 sal_Bool IsSetting() const { return mbSet; }
1253 class VCL_DLLPUBLIC MetaCommentAction : public MetaAction
1255 private:
1257 OString maComment;
1258 sal_Int32 mnValue;
1259 sal_uInt32 mnDataSize;
1260 sal_uInt8* mpData;
1262 SAL_DLLPRIVATE void ImplInitDynamicData( const sal_uInt8* pData, sal_uInt32 nDataSize );
1263 virtual sal_Bool Compare( const MetaAction& ) const;
1265 protected:
1266 virtual ~MetaCommentAction();
1268 public:
1269 explicit MetaCommentAction( sal_Int32 nValue = 0L );
1270 explicit MetaCommentAction( const MetaCommentAction& rAct );
1271 explicit MetaCommentAction( const OString& rComment, sal_Int32 nValue = 0L, const sal_uInt8* pData = NULL, sal_uInt32 nDataSize = 0UL );
1273 virtual void Move( long nHorzMove, long nVertMove );
1274 virtual void Scale( double fScaleX, double fScaleY );
1276 virtual void Execute( OutputDevice* pOut );
1277 virtual MetaAction* Clone();
1278 virtual void Write( SvStream& rOStm, ImplMetaWriteData* pData );
1279 virtual void Read( SvStream& rIStm, ImplMetaReadData* pData );
1281 const OString& GetComment() const { return maComment; }
1282 sal_Int32 GetValue() const { return mnValue; }
1283 sal_uInt32 GetDataSize() const { return mnDataSize; }
1284 const sal_uInt8* GetData() const { return mpData; }
1287 class VCL_DLLPUBLIC MetaLayoutModeAction : public MetaAction
1289 private:
1291 sal_uInt32 mnLayoutMode;
1292 virtual sal_Bool Compare( const MetaAction& ) const;
1294 public:
1295 DECL_META_ACTION( LayoutMode, META_LAYOUTMODE_ACTION )
1297 explicit MetaLayoutModeAction( sal_uInt32 nLayoutMode );
1299 sal_uInt32 GetLayoutMode() const { return mnLayoutMode; }
1302 class VCL_DLLPUBLIC MetaTextLanguageAction : public MetaAction
1304 private:
1306 LanguageType meTextLanguage;
1307 virtual sal_Bool Compare( const MetaAction& ) const;
1309 public:
1310 DECL_META_ACTION( TextLanguage, META_TEXTLANGUAGE_ACTION )
1312 explicit MetaTextLanguageAction( LanguageType );
1314 LanguageType GetTextLanguage() const { return meTextLanguage; }
1317 #endif // INCLUDED_VCL_METAACT_HXX
1319 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */