124f6443dSAndrew Rist /**************************************************************
2cdf0e10cSrcweir *
324f6443dSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
424f6443dSAndrew Rist * or more contributor license agreements. See the NOTICE file
524f6443dSAndrew Rist * distributed with this work for additional information
624f6443dSAndrew Rist * regarding copyright ownership. The ASF licenses this file
724f6443dSAndrew Rist * to you under the Apache License, Version 2.0 (the
824f6443dSAndrew Rist * "License"); you may not use this file except in compliance
924f6443dSAndrew Rist * with the License. You may obtain a copy of the License at
1024f6443dSAndrew Rist *
1124f6443dSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0
1224f6443dSAndrew Rist *
1324f6443dSAndrew Rist * Unless required by applicable law or agreed to in writing,
1424f6443dSAndrew Rist * software distributed under the License is distributed on an
1524f6443dSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1624f6443dSAndrew Rist * KIND, either express or implied. See the License for the
1724f6443dSAndrew Rist * specific language governing permissions and limitations
1824f6443dSAndrew Rist * under the License.
1924f6443dSAndrew Rist *
2024f6443dSAndrew Rist *************************************************************/
2124f6443dSAndrew Rist
2224f6443dSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweir #ifndef _SV_SALGDI_H
25cdf0e10cSrcweir #define _SV_SALGDI_H
26cdf0e10cSrcweir
27cdf0e10cSrcweir // -=-= includes -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
28cdf0e10cSrcweir #include "tools/fract.hxx"
29cdf0e10cSrcweir
30cdf0e10cSrcweir #include "vcl/salgtype.hxx"
31cdf0e10cSrcweir #include "vcl/vclenum.hxx"
32cdf0e10cSrcweir
33cdf0e10cSrcweir #include "salstd.hxx"
34cdf0e10cSrcweir #include "salgdi.hxx"
35cdf0e10cSrcweir #include "sallayout.hxx"
36cdf0e10cSrcweir #include "vclpluginapi.h"
37cdf0e10cSrcweir
38cdf0e10cSrcweir #include <deque>
39cdf0e10cSrcweir
40cdf0e10cSrcweir // -=-= forwards -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
41ee206fdaSHerbert Dürr class ImplFontMetricData;
42ee206fdaSHerbert Dürr class ImplFontSelectData;
43cdf0e10cSrcweir class SalBitmap;
44cdf0e10cSrcweir class SalColormap;
45cdf0e10cSrcweir class SalDisplay;
46cdf0e10cSrcweir class SalFrame;
47cdf0e10cSrcweir class X11SalVirtualDevice;
48cdf0e10cSrcweir class SalPolyLine;
49cdf0e10cSrcweir class PspSalPrinter;
50cdf0e10cSrcweir class PspSalInfoPrinter;
51cdf0e10cSrcweir class ServerFont;
52cdf0e10cSrcweir class ImplLayoutArgs;
53cdf0e10cSrcweir class X11FontLayout;
54cdf0e10cSrcweir class ServerFontLayout;
55cdf0e10cSrcweir
56cdf0e10cSrcweir namespace basegfx {
57cdf0e10cSrcweir class B2DTrapezoid;
58cdf0e10cSrcweir }
59cdf0e10cSrcweir
60cdf0e10cSrcweir // -=-= SalGraphicsData =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
61cdf0e10cSrcweir
62cdf0e10cSrcweir class CairoFontsCache
63cdf0e10cSrcweir {
64cdf0e10cSrcweir private:
65cdf0e10cSrcweir static int mnRefCount;
66cdf0e10cSrcweir typedef std::deque< std::pair<void *, void*> > LRUFonts;
67cdf0e10cSrcweir static LRUFonts maLRUFonts;
68cdf0e10cSrcweir public:
69cdf0e10cSrcweir CairoFontsCache();
70cdf0e10cSrcweir static void CacheFont(void *pFont, void *pId);
71cdf0e10cSrcweir static void* FindCachedFont(void *pId);
72cdf0e10cSrcweir ~CairoFontsCache();
73cdf0e10cSrcweir };
74cdf0e10cSrcweir
75cdf0e10cSrcweir class VCLPLUG_GEN_PUBLIC X11SalGraphics : public SalGraphics
76cdf0e10cSrcweir {
77cdf0e10cSrcweir friend class X11FontLayout;
78cdf0e10cSrcweir friend class ServerFontLayout;
79cdf0e10cSrcweir protected:
80cdf0e10cSrcweir SalFrame* m_pFrame; // the SalFrame which created this Graphics or NULL
81cdf0e10cSrcweir X11SalVirtualDevice* m_pVDev; // the SalVirtualDevice which created this Graphics or NULL
82cdf0e10cSrcweir
83cdf0e10cSrcweir const SalColormap* m_pColormap;
84cdf0e10cSrcweir SalColormap *m_pDeleteColormap;
85cdf0e10cSrcweir Drawable hDrawable_; // use
86cdf0e10cSrcweir int m_nScreen;
87cdf0e10cSrcweir void* m_pRenderFormat;
88cdf0e10cSrcweir XID m_aRenderPicture;
89cdf0e10cSrcweir CairoFontsCache m_aCairoFontsCache;
90cdf0e10cSrcweir
91cdf0e10cSrcweir XLIB_Region pPaintRegion_;
92cdf0e10cSrcweir XLIB_Region mpClipRegion;
93cdf0e10cSrcweir
94cdf0e10cSrcweir GC pPenGC_; // Pen attributes
95cdf0e10cSrcweir SalColor nPenColor_;
96cdf0e10cSrcweir Pixel nPenPixel_;
97cdf0e10cSrcweir
98cdf0e10cSrcweir GC pFontGC_; // Font attributes
99cdf0e10cSrcweir ServerFont* mpServerFont[ MAX_FALLBACK ];
100cdf0e10cSrcweir
101cdf0e10cSrcweir SalColor nTextColor_;
102cdf0e10cSrcweir Pixel nTextPixel_;
103cdf0e10cSrcweir sal_Bool bFontVertical_;
104cdf0e10cSrcweir
105cdf0e10cSrcweir sal_Bool bDisableGraphite_;
106cdf0e10cSrcweir
107cdf0e10cSrcweir GC pBrushGC_; // Brush attributes
108cdf0e10cSrcweir SalColor nBrushColor_;
109cdf0e10cSrcweir Pixel nBrushPixel_;
110cdf0e10cSrcweir Pixmap hBrush_; // Dither
111cdf0e10cSrcweir
112cdf0e10cSrcweir GC pMonoGC_;
113cdf0e10cSrcweir GC pCopyGC_;
114cdf0e10cSrcweir GC pMaskGC_;
115cdf0e10cSrcweir GC pInvertGC_;
116cdf0e10cSrcweir GC pInvert50GC_;
117cdf0e10cSrcweir GC pStippleGC_;
118cdf0e10cSrcweir GC pTrackingGC_;
119cdf0e10cSrcweir
120cdf0e10cSrcweir sal_Bool bWindow_ : 1; // is Window
121cdf0e10cSrcweir sal_Bool bPrinter_ : 1; // is Printer
122cdf0e10cSrcweir sal_Bool bVirDev_ : 1; // is VirDev
123cdf0e10cSrcweir sal_Bool bPenGC_ : 1; // is Pen GC valid
124cdf0e10cSrcweir sal_Bool bFontGC_ : 1; // is Font GC valid
125cdf0e10cSrcweir sal_Bool bBrushGC_ : 1; // is Brush GC valid
126cdf0e10cSrcweir sal_Bool bMonoGC_ : 1; // is Mono GC valid
127cdf0e10cSrcweir sal_Bool bCopyGC_ : 1; // is Copy GC valid
128cdf0e10cSrcweir sal_Bool bInvertGC_ : 1; // is Invert GC valid
129cdf0e10cSrcweir sal_Bool bInvert50GC_ : 1; // is Invert50 GC valid
130cdf0e10cSrcweir sal_Bool bStippleGC_ : 1; // is Stipple GC valid
131cdf0e10cSrcweir sal_Bool bTrackingGC_ : 1; // is Tracking GC valid
132cdf0e10cSrcweir bool bXORMode_ : 1; // is ROP XOR Mode set
133cdf0e10cSrcweir sal_Bool bDitherBrush_ : 1; // is solid or tile
134cdf0e10cSrcweir
135cdf0e10cSrcweir using SalGraphics::SetClipRegion;
136cdf0e10cSrcweir void SetClipRegion( GC pGC,
137cdf0e10cSrcweir XLIB_Region pXReg = NULL ) const;
138cdf0e10cSrcweir
139cdf0e10cSrcweir GC GetTrackingGC();
140cdf0e10cSrcweir GC GetInvertGC();
141cdf0e10cSrcweir GC GetInvert50GC();
142cdf0e10cSrcweir GC CreateGC( Drawable hDrawable,
143cdf0e10cSrcweir unsigned long nMask = GCGraphicsExposures );
144cdf0e10cSrcweir GC SelectPen();
145cdf0e10cSrcweir GC SelectBrush();
146cdf0e10cSrcweir void DrawLines( sal_uIntPtr nPoints,
147cdf0e10cSrcweir const SalPolyLine &rPoints,
148cdf0e10cSrcweir GC pGC,
149cdf0e10cSrcweir bool bClose
150cdf0e10cSrcweir );
151cdf0e10cSrcweir sal_Bool GetDitherPixmap ( SalColor nSalColor );
152cdf0e10cSrcweir
153cdf0e10cSrcweir inline GC GetMonoGC( Pixmap hPixmap );
154cdf0e10cSrcweir inline GC GetCopyGC();
155cdf0e10cSrcweir inline GC GetStippleGC();
156cdf0e10cSrcweir
157cdf0e10cSrcweir int Clip ( XLIB_Region pRegion,
158cdf0e10cSrcweir int &nX,
159cdf0e10cSrcweir int &nY,
160cdf0e10cSrcweir unsigned int &nDX,
161cdf0e10cSrcweir unsigned int &nDY,
162cdf0e10cSrcweir int &nSrcX,
163cdf0e10cSrcweir int &nSrcY ) const;
164cdf0e10cSrcweir int Clip ( int &nX,
165cdf0e10cSrcweir int &nY,
166cdf0e10cSrcweir unsigned int &nDX,
167cdf0e10cSrcweir unsigned int &nDY,
168cdf0e10cSrcweir int &nSrcX,
169cdf0e10cSrcweir int &nSrcY ) const;
170cdf0e10cSrcweir GC SetMask ( int &nX,
171cdf0e10cSrcweir int &nY,
172cdf0e10cSrcweir unsigned int &nDX,
173cdf0e10cSrcweir unsigned int &nDY,
174cdf0e10cSrcweir int &nSrcX,
175cdf0e10cSrcweir int &nSrcY,
176cdf0e10cSrcweir Pixmap hClipMask );
177cdf0e10cSrcweir using SalGraphics::DrawBitmap;
1785f27b83cSArmin Le Grand void DrawBitmap( const SalTwoRect& rPosAry,
179cdf0e10cSrcweir SalGraphics *pThis,
180cdf0e10cSrcweir const SalBitmap &rSalBitmap,
181cdf0e10cSrcweir const SalBitmap &rTransparentBitmap,
182cdf0e10cSrcweir SalColor nTransparentColor );
183cdf0e10cSrcweir
184cdf0e10cSrcweir GC GetFontGC();
185cdf0e10cSrcweir bool setFont( const ImplFontSelectData* pEntry, int nFallbackLevel );
186cdf0e10cSrcweir
1875f27b83cSArmin Le Grand void drawMaskedBitmap( const SalTwoRect& rPosAry,
188cdf0e10cSrcweir const SalBitmap& rSalBitmap,
189cdf0e10cSrcweir const SalBitmap& rTransparentBitmap );
190cdf0e10cSrcweir
191cdf0e10cSrcweir protected:
192cdf0e10cSrcweir void DrawPrinterString( const SalLayout& );
193cdf0e10cSrcweir
194cdf0e10cSrcweir void DrawServerFontString( const ServerFontLayout& );
195cdf0e10cSrcweir void DrawServerSimpleFontString( const ServerFontLayout& );
196cdf0e10cSrcweir void DrawServerAAFontString( const ServerFontLayout& );
197cdf0e10cSrcweir bool DrawServerAAForcedString( const ServerFontLayout& );
198cdf0e10cSrcweir void DrawCairoAAFontString( const ServerFontLayout& );
199cdf0e10cSrcweir
200cdf0e10cSrcweir void freeResources();
201cdf0e10cSrcweir public:
202cdf0e10cSrcweir X11SalGraphics();
203cdf0e10cSrcweir virtual ~X11SalGraphics();
204cdf0e10cSrcweir
205cdf0e10cSrcweir void Init( SalFrame *pFrame, Drawable aDrawable, int nScreen );
206cdf0e10cSrcweir void Init( X11SalVirtualDevice *pVirtualDevice, SalColormap* pColormap = NULL, bool bDeleteColormap = false );
207cdf0e10cSrcweir void Init( class ImplSalPrinterData *pPrinter );
208cdf0e10cSrcweir void DeInit();
209cdf0e10cSrcweir
210cdf0e10cSrcweir inline const SalDisplay* GetDisplay() const;
211cdf0e10cSrcweir inline Display* GetXDisplay() const;
212cdf0e10cSrcweir inline const SalVisual& GetVisual() const;
GetDrawable() const213cdf0e10cSrcweir inline Drawable GetDrawable() const { return hDrawable_; }
214cdf0e10cSrcweir void SetDrawable( Drawable d, int nScreen );
215cdf0e10cSrcweir XID GetXRenderPicture();
GetXRenderFormat() const216cdf0e10cSrcweir void* GetXRenderFormat() const { return m_pRenderFormat; }
SetXRenderFormat(void * pRenderFormat)217cdf0e10cSrcweir inline void SetXRenderFormat( void* pRenderFormat ) { m_pRenderFormat = pRenderFormat; }
GetColormap() const218cdf0e10cSrcweir inline const SalColormap& GetColormap() const { return *m_pColormap; }
219cdf0e10cSrcweir using SalGraphics::GetPixel;
220cdf0e10cSrcweir inline Pixel GetPixel( SalColor nSalColor ) const;
221cdf0e10cSrcweir
GetScreenNumber() const222cdf0e10cSrcweir int GetScreenNumber() const { return m_nScreen; }
223cdf0e10cSrcweir
224cdf0e10cSrcweir // overload all pure virtual methods
225cdf0e10cSrcweir virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY );
226cdf0e10cSrcweir virtual sal_uInt16 GetBitCount();
227cdf0e10cSrcweir virtual long GetGraphicsWidth() const;
228cdf0e10cSrcweir virtual long GetGraphicsHeight() const;
229cdf0e10cSrcweir
230cdf0e10cSrcweir virtual void ResetClipRegion();
231cdf0e10cSrcweir virtual bool setClipRegion( const Region& );
232cdf0e10cSrcweir
233cdf0e10cSrcweir virtual void SetLineColor();
234cdf0e10cSrcweir virtual void SetLineColor( SalColor nSalColor );
235cdf0e10cSrcweir virtual void SetFillColor();
236cdf0e10cSrcweir
237cdf0e10cSrcweir virtual void SetFillColor( SalColor nSalColor );
238cdf0e10cSrcweir
239cdf0e10cSrcweir virtual void SetXORMode( bool bSet, bool );
240cdf0e10cSrcweir
241cdf0e10cSrcweir virtual void SetROPLineColor( SalROPColor nROPColor );
242cdf0e10cSrcweir virtual void SetROPFillColor( SalROPColor nROPColor );
243cdf0e10cSrcweir
244cdf0e10cSrcweir virtual void SetTextColor( SalColor nSalColor );
245cdf0e10cSrcweir virtual sal_uInt16 SetFont( ImplFontSelectData*, int nFallbackLevel );
246cdf0e10cSrcweir virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel );
247cdf0e10cSrcweir virtual sal_uLong GetKernPairs( sal_uLong nMaxPairs, ImplKernPairData* );
248cdf0e10cSrcweir virtual const ImplFontCharMap* GetImplFontCharMap() const;
249cdf0e10cSrcweir virtual void GetDevFontList( ImplDevFontList* );
250cdf0e10cSrcweir virtual void GetDevFontSubstList( OutputDevice* );
251cdf0e10cSrcweir virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
252cdf0e10cSrcweir virtual sal_Bool CreateFontSubset( const rtl::OUString& rToFile,
253cdf0e10cSrcweir const ImplFontData*,
254248a599fSHerbert Dürr sal_GlyphId* pGlyphIds,
255cdf0e10cSrcweir sal_uInt8* pEncoding,
256cdf0e10cSrcweir sal_Int32* pWidths,
257cdf0e10cSrcweir int nGlyphs,
258cdf0e10cSrcweir FontSubsetInfo& rInfo
259cdf0e10cSrcweir );
260cdf0e10cSrcweir virtual const Ucs2SIntMap* GetFontEncodingVector( const ImplFontData*, const Ucs2OStrMap** ppNonEncoded );
261cdf0e10cSrcweir virtual const void* GetEmbedFontData( const ImplFontData*,
262cdf0e10cSrcweir const sal_Ucs* pUnicodes,
263cdf0e10cSrcweir sal_Int32* pWidths,
264cdf0e10cSrcweir FontSubsetInfo& rInfo,
265cdf0e10cSrcweir long* pDataLen );
266cdf0e10cSrcweir virtual void FreeEmbedFontData( const void* pData, long nDataLen );
267cdf0e10cSrcweir virtual void GetGlyphWidths( const ImplFontData*,
268cdf0e10cSrcweir bool bVertical,
269cdf0e10cSrcweir Int32Vector& rWidths,
270cdf0e10cSrcweir Ucs2UIntMap& rUnicodeEnc );
271248a599fSHerbert Dürr virtual bool GetGlyphBoundRect( sal_GlyphId nIndex, Rectangle& );
272248a599fSHerbert Dürr virtual bool GetGlyphOutline( sal_GlyphId nIndex, ::basegfx::B2DPolyPolygon& );
273cdf0e10cSrcweir virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
274cdf0e10cSrcweir virtual void DrawServerFontLayout( const ServerFontLayout& );
275cdf0e10cSrcweir virtual bool supportsOperation( OutDevSupportType ) const;
276cdf0e10cSrcweir virtual void drawPixel( long nX, long nY );
277cdf0e10cSrcweir virtual void drawPixel( long nX, long nY, SalColor nSalColor );
278cdf0e10cSrcweir virtual void drawLine( long nX1, long nY1, long nX2, long nY2 );
279cdf0e10cSrcweir virtual void drawRect( long nX, long nY, long nWidth, long nHeight );
280*54ae6a37SHerbert Dürr void drawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry, bool bClose );
281*54ae6a37SHerbert Dürr virtual void drawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry );
282*54ae6a37SHerbert Dürr virtual void drawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry );
283cdf0e10cSrcweir virtual void drawPolyPolygon( sal_uInt32 nPoly,
284cdf0e10cSrcweir const sal_uInt32* pPoints,
285cdf0e10cSrcweir PCONSTSALPOINT* pPtAry );
286cdf0e10cSrcweir virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency );
2875aaf853bSArmin Le Grand virtual bool drawPolyLine(
2885aaf853bSArmin Le Grand const ::basegfx::B2DPolygon&,
2895aaf853bSArmin Le Grand double fTransparency,
2905aaf853bSArmin Le Grand const ::basegfx::B2DVector& rLineWidth,
2915aaf853bSArmin Le Grand basegfx::B2DLineJoin,
2925aaf853bSArmin Le Grand com::sun::star::drawing::LineCap);
293cdf0e10cSrcweir virtual bool drawFilledTrapezoids( const ::basegfx::B2DTrapezoid*, int nTrapCount, double fTransparency );
294cdf0e10cSrcweir
295cdf0e10cSrcweir #if 1 // TODO: remove these obselete methods
296*54ae6a37SHerbert Dürr virtual sal_Bool drawPolyLineBezier( sal_uInt32 nPoints,
297cdf0e10cSrcweir const SalPoint* pPtAry,
298cdf0e10cSrcweir const sal_uInt8* pFlgAry );
299*54ae6a37SHerbert Dürr virtual sal_Bool drawPolygonBezier( sal_uInt32 nPoints,
300cdf0e10cSrcweir const SalPoint* pPtAry,
301cdf0e10cSrcweir const sal_uInt8* pFlgAry );
302cdf0e10cSrcweir virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly,
303cdf0e10cSrcweir const sal_uInt32* pPoints,
304cdf0e10cSrcweir const SalPoint* const* pPtAry,
305cdf0e10cSrcweir const sal_uInt8* const* pFlgAry );
306cdf0e10cSrcweir #endif
307cdf0e10cSrcweir
308cdf0e10cSrcweir virtual void copyArea( long nDestX,
309cdf0e10cSrcweir long nDestY,
310cdf0e10cSrcweir long nSrcX,
311cdf0e10cSrcweir long nSrcY,
312cdf0e10cSrcweir long nSrcWidth,
313cdf0e10cSrcweir long nSrcHeight,
314cdf0e10cSrcweir sal_uInt16 nFlags );
3155f27b83cSArmin Le Grand virtual void copyBits( const SalTwoRect& rPosAry,
316cdf0e10cSrcweir SalGraphics* pSrcGraphics );
3175f27b83cSArmin Le Grand virtual void drawBitmap( const SalTwoRect& rPosAry,
318cdf0e10cSrcweir const SalBitmap& rSalBitmap );
3195f27b83cSArmin Le Grand virtual void drawBitmap( const SalTwoRect& rPosAry,
320cdf0e10cSrcweir const SalBitmap& rSalBitmap,
321cdf0e10cSrcweir SalColor nTransparentColor );
3225f27b83cSArmin Le Grand virtual void drawBitmap( const SalTwoRect& rPosAry,
323cdf0e10cSrcweir const SalBitmap& rSalBitmap,
324cdf0e10cSrcweir const SalBitmap& rMaskBitmap );
3255f27b83cSArmin Le Grand virtual void drawMask( const SalTwoRect& rPosAry,
326cdf0e10cSrcweir const SalBitmap& rSalBitmap,
327cdf0e10cSrcweir SalColor nMaskColor );
328cdf0e10cSrcweir virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight );
329cdf0e10cSrcweir virtual SalColor getPixel( long nX, long nY );
330cdf0e10cSrcweir virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags );
331*54ae6a37SHerbert Dürr virtual void invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nFlags );
332cdf0e10cSrcweir
333cdf0e10cSrcweir virtual sal_Bool drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uIntPtr nSize );
334cdf0e10cSrcweir
335cdf0e10cSrcweir virtual bool drawAlphaBitmap( const SalTwoRect&,
336cdf0e10cSrcweir const SalBitmap& rSourceBitmap,
337cdf0e10cSrcweir const SalBitmap& rAlphaBitmap );
3385f27b83cSArmin Le Grand virtual bool drawTransformedBitmap(
3395f27b83cSArmin Le Grand const basegfx::B2DPoint& rNull,
3405f27b83cSArmin Le Grand const basegfx::B2DPoint& rX,
3415f27b83cSArmin Le Grand const basegfx::B2DPoint& rY,
3425f27b83cSArmin Le Grand const SalBitmap& rSourceBitmap,
3435f27b83cSArmin Le Grand const SalBitmap* pAlphaBitmap);
344cdf0e10cSrcweir
345cdf0e10cSrcweir virtual bool drawAlphaRect( long nX, long nY, long nWidth,
346cdf0e10cSrcweir long nHeight, sal_uInt8 nTransparency );
347cdf0e10cSrcweir
348cdf0e10cSrcweir virtual SystemGraphicsData GetGraphicsData() const;
349cdf0e10cSrcweir virtual SystemFontData GetSysFontData( int nFallbacklevel ) const;
350cdf0e10cSrcweir
351cdf0e10cSrcweir /* use to handle GraphicsExpose/NoExpose after XCopyArea & friends
352cdf0e10cSrcweir * if pFrame is not NULL, corresponding Paint events are generated
353cdf0e10cSrcweir * and dispatched to pFrame
354cdf0e10cSrcweir *
355cdf0e10cSrcweir * it is imperative to eat up graphics exposes even in case you don't need
356cdf0e10cSrcweir * them because the next one using XCopyArea can depend on them
357cdf0e10cSrcweir */
358cdf0e10cSrcweir void YieldGraphicsExpose();
359cdf0e10cSrcweir
360cdf0e10cSrcweir // do XCopyArea or XGet/PutImage depending on screen numbers
361cdf0e10cSrcweir // signature is like XCopyArea with screen numbers added
362cdf0e10cSrcweir static void CopyScreenArea( Display* pDisplay,
363cdf0e10cSrcweir Drawable aSrc, int nScreenSrc, int nSrcDepth,
364cdf0e10cSrcweir Drawable aDest, int nScreenDest, int nDestDepth,
365cdf0e10cSrcweir GC aDestGC,
366cdf0e10cSrcweir int src_x, int src_y,
367cdf0e10cSrcweir unsigned int w, unsigned int h,
368cdf0e10cSrcweir int dest_x, int dest_y );
369cdf0e10cSrcweir static void releaseGlyphPeer();
370cdf0e10cSrcweir };
371cdf0e10cSrcweir
372cdf0e10cSrcweir
GetDisplay() const373cdf0e10cSrcweir inline const SalDisplay *X11SalGraphics::GetDisplay() const
374cdf0e10cSrcweir { return GetColormap().GetDisplay(); }
375cdf0e10cSrcweir
GetVisual() const376cdf0e10cSrcweir inline const SalVisual& X11SalGraphics::GetVisual() const
377cdf0e10cSrcweir { return GetColormap().GetVisual(); }
378cdf0e10cSrcweir
GetXDisplay() const379cdf0e10cSrcweir inline Display *X11SalGraphics::GetXDisplay() const
380cdf0e10cSrcweir { return GetColormap().GetXDisplay(); }
381cdf0e10cSrcweir
GetPixel(SalColor nSalColor) const382cdf0e10cSrcweir inline Pixel X11SalGraphics::GetPixel( SalColor nSalColor ) const
383cdf0e10cSrcweir { return GetColormap().GetPixel( nSalColor ); }
384cdf0e10cSrcweir
385cdf0e10cSrcweir
386cdf0e10cSrcweir // -=-= Shortcuts =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
387cdf0e10cSrcweir
388cdf0e10cSrcweir #ifdef DBG_UTIL
389cdf0e10cSrcweir #define stderr0( s ) fprintf( stderr, s )
390cdf0e10cSrcweir #else
391cdf0e10cSrcweir #define stderr0( s ) ;
392cdf0e10cSrcweir #endif
393cdf0e10cSrcweir
394cdf0e10cSrcweir #endif // _SV_SALGDI_H
395cdf0e10cSrcweir
396