1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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>
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
;
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(); \
119 virtual ~Meta##Name##Action(); \
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
134 sal_uLong mnRefCount
;
137 virtual sal_Bool
Compare( const MetaAction
& ) const;
140 virtual ~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; }
163 static MetaAction
* ReadMetaAction( SvStream
& rIStm
, ImplMetaReadData
* pData
);
166 class VCL_DLLPUBLIC MetaPixelAction
: public MetaAction
172 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
191 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
212 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
235 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
252 sal_uInt32 mnHorzRound
;
253 sal_uInt32 mnVertRound
;
255 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
277 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
298 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
322 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
346 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
369 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
390 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
407 PolyPolygon maPolyPoly
;
409 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
431 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
458 virtual sal_Bool
Compare( const MetaAction
& ) const;
461 virtual ~MetaTextArrayAction();
464 MetaTextArrayAction();
465 MetaTextArrayAction( const MetaTextArrayAction
& rAction
);
466 MetaTextArrayAction( const Point
& rStartPt
, const OUString
& rStr
,
467 const sal_Int32
* pDXAry
, sal_uInt16 nIndex
,
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
497 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
524 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
546 FontStrikeout meStrikeout
;
547 FontUnderline meUnderline
;
548 FontUnderline meOverline
;
550 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
576 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
598 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
624 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
650 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
672 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
698 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
725 virtual sal_Bool
Compare( const MetaAction
& ) const;
728 DECL_META_ACTION( Mask
, META_MASK_ACTION
)
730 MetaMaskAction( const Point
& rPt
,
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
751 virtual sal_Bool
Compare( const MetaAction
& ) const;
754 DECL_META_ACTION( MaskScale
, META_MASKSCALE_ACTION
)
756 MetaMaskScaleAction( const Point
& rPt
, const Size
& rSz
,
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
780 virtual sal_Bool
Compare( const MetaAction
& ) const;
783 DECL_META_ACTION( MaskScalePart
, META_MASKSCALEPART_ACTION
)
785 MetaMaskScalePartAction( const Point
& rDstPt
, const Size
& rDstSz
,
786 const Point
& rSrcPt
, const Size
& rSrcSz
,
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
808 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
826 PolyPolygon maPolyPoly
;
829 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
847 PolyPolygon maPolyPoly
;
850 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
869 Wallpaper maWallpaper
;
871 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
893 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
913 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
932 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
952 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
972 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
990 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
1007 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
1024 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
1042 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
1060 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
1077 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
1093 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
1111 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
1129 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
1143 DECL_META_ACTION( Pop
, META_POP_ACTION
)
1146 class VCL_DLLPUBLIC MetaRasterOpAction
: public MetaAction
1150 RasterOp meRasterOp
;
1152 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
1166 PolyPolygon maPolyPoly
;
1167 sal_uInt16 mnTransPercent
;
1169 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
1190 Gradient maGradient
;
1192 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
1214 GDIMetaFile maSubst
;
1218 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
1242 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
1259 sal_uInt32 mnDataSize
;
1262 SAL_DLLPRIVATE
void ImplInitDynamicData( const sal_uInt8
* pData
, sal_uInt32 nDataSize
);
1263 virtual sal_Bool
Compare( const MetaAction
& ) const;
1266 virtual ~MetaCommentAction();
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
1291 sal_uInt32 mnLayoutMode
;
1292 virtual sal_Bool
Compare( const MetaAction
& ) const;
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
1306 LanguageType meTextLanguage
;
1307 virtual sal_Bool
Compare( const MetaAction
& ) const;
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: */