LibreOffice Module vcl (master) 1
salgdilayout.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#include <sal/config.h>
21
22#include <memory>
23#include <config_features.h>
24#include <sal/log.hxx>
26#include <salgdi.hxx>
27#include <salframe.hxx>
31#include <rtl/math.hxx>
32#include <comphelper/lok.hxx>
33#include <toolbarvalue.hxx>
34
35// The only common SalFrame method
36
38{
39 // mirror frame coordinates at parent
40 SalFrame *pParent = GetParent();
41 if( pParent && AllSettings::GetLayoutRTL() )
42 {
44 const int nParentX = aGeom.x() - pParent->maGeometry.x();
45 aGeom.setX(pParent->maGeometry.x() + pParent->maGeometry.width() - maGeometry.width() - nParentX);
46 return aGeom;
47 }
48 else
49 return maGeometry;
50}
51
53: m_nLayout( SalLayoutFlags::NONE ),
54 m_eLastMirrorMode(MirrorMode::NONE),
55 m_nLastMirrorTranslation(0),
56 m_bAntiAlias(false)
57{
58 // read global RTL settings
61}
62
64{
65 static bool bFileDefinitionsWidgetDraw = !!getenv("VCL_DRAW_WIDGETS_FROM_FILE");
66
67 if (bFileDefinitionsWidgetDraw || bForce)
68 {
70 auto pFileDefinitionWidgetDraw = static_cast<vcl::FileDefinitionWidgetDraw*>(m_pWidgetDraw.get());
71 if (!pFileDefinitionWidgetDraw->isActive())
72 {
73 m_pWidgetDraw.reset();
74 return false;
75 }
76 return true;
77 }
78 return false;
79}
80
81SalGraphics::~SalGraphics() COVERITY_NOEXCEPT_FALSE
82{
83 // can't call ReleaseFonts here, as the destructor just calls this classes SetFont (pure virtual)!
84}
85
87 const basegfx::B2DPoint& /* rNull */,
88 const basegfx::B2DPoint& /* rX */,
89 const basegfx::B2DPoint& /* rY */,
90 const SalBitmap& /* rSourceBitmap */,
91 const SalBitmap* /* pAlphaBitmap */,
92 double /* fAlpha */)
93{
94 // here direct support for transformed bitmaps can be implemented
95 return false;
96}
97
99{
100 mirror(x, rOutDev);
101 return x;
102}
103
105{
106 return rOutDev.IsVirtual() ? rOutDev.GetOutputWidthPixel() : GetGraphicsWidth();
107}
108
109void SalGraphics::mirror( tools::Long& x, const OutputDevice& rOutDev ) const
110{
111 const tools::Long w = GetDeviceWidth(rOutDev);
112 if( !w )
113 return;
114
115 if (rOutDev.ImplIsAntiparallel() )
116 {
117 // mirror this window back
119 {
120 tools::Long devX = w - rOutDev.GetOutputWidthPixel() - rOutDev.GetOutOffXPixel(); // re-mirrored mnOutOffX
121 x = devX + (x - rOutDev.GetOutOffXPixel());
122 }
123 else
124 {
125 tools::Long devX = rOutDev.GetOutOffXPixel(); // re-mirrored mnOutOffX
126 x = rOutDev.GetOutputWidthPixel() - (x - devX) + rOutDev.GetOutOffXPixel() - 1;
127 }
128 }
130 x = w-1-x;
131}
132
133void SalGraphics::mirror( tools::Long& x, tools::Long nWidth, const OutputDevice& rOutDev, bool bBack ) const
134{
135 const tools::Long w = GetDeviceWidth(rOutDev);
136 if( !w )
137 return;
138
139 if (rOutDev.ImplIsAntiparallel() )
140 {
141 // mirror this window back
143 {
144 tools::Long devX = w - rOutDev.GetOutputWidthPixel() - rOutDev.GetOutOffXPixel(); // re-mirrored mnOutOffX
145 if( bBack )
146 x = x - devX + rOutDev.GetOutOffXPixel();
147 else
148 x = devX + (x - rOutDev.GetOutOffXPixel());
149 }
150 else
151 {
152 tools::Long devX = rOutDev.GetOutOffXPixel(); // re-mirrored mnOutOffX
153 if( bBack )
154 x = devX + (rOutDev.GetOutputWidthPixel() + devX) - (x + nWidth);
155 else
156 x = rOutDev.GetOutputWidthPixel() - (x - devX) + rOutDev.GetOutOffXPixel() - nWidth;
157 }
158 }
160 x = w-nWidth-x;
161}
162
163bool SalGraphics::mirror( sal_uInt32 nPoints, const Point *pPtAry, Point *pPtAry2, const OutputDevice& rOutDev ) const
164{
165 const tools::Long w = GetDeviceWidth(rOutDev);
166 if( w )
167 {
168 sal_uInt32 i, j;
169
170 if (rOutDev.ImplIsAntiparallel())
171 {
172 // mirror this window back
174 {
175 tools::Long devX = w - rOutDev.GetOutputWidthPixel() - rOutDev.GetOutOffXPixel(); // re-mirrored mnOutOffX
176 for( i=0, j=nPoints-1; i<nPoints; i++,j-- )
177 {
178 pPtAry2[j].setX( devX + (pPtAry[i].getX() - rOutDev.GetOutOffXPixel()) );
179 pPtAry2[j].setY( pPtAry[i].getY() );
180 }
181 }
182 else
183 {
184 tools::Long devX = rOutDev.GetOutOffXPixel(); // re-mirrored mnOutOffX
185 for( i=0, j=nPoints-1; i<nPoints; i++,j-- )
186 {
187 pPtAry2[j].setX( rOutDev.GetOutputWidthPixel() - (pPtAry[i].getX() - devX) + rOutDev.GetOutOffXPixel() - 1 );
188 pPtAry2[j].setY( pPtAry[i].getY() );
189 }
190 }
191 }
193 {
194 for( i=0, j=nPoints-1; i<nPoints; i++,j-- )
195 {
196 pPtAry2[j].setX( w-1-pPtAry[i].getX() );
197 pPtAry2[j].setY( pPtAry[i].getY() );
198 }
199 }
200 return true;
201 }
202 else
203 return false;
204}
205
206void SalGraphics::mirror( vcl::Region& rRgn, const OutputDevice& rOutDev ) const
207{
209 {
210 const basegfx::B2DPolyPolygon aPolyPoly(mirror(rRgn.GetAsB2DPolyPolygon(), rOutDev));
211
212 rRgn = vcl::Region(aPolyPoly);
213 }
214 else
215 {
216 RectangleVector aRectangles;
217 rRgn.GetRegionRectangles(aRectangles);
218 rRgn.SetEmpty();
219
220 for (auto & rectangle : aRectangles)
221 {
222 mirror(rectangle, rOutDev);
223 rRgn.Union(rectangle);
224 }
225
226 //ImplRegionInfo aInfo;
227 //bool bRegionRect;
228 //Region aMirroredRegion;
229 //long nX, nY, nWidth, nHeight;
230
231 //bRegionRect = rRgn.ImplGetFirstRect( aInfo, nX, nY, nWidth, nHeight );
232 //while ( bRegionRect )
233 //{
234 // Rectangle aRect( Point(nX, nY), Size(nWidth, nHeight) );
235 // mirror( aRect, rOutDev, bBack );
236 // aMirroredRegion.Union( aRect );
237 // bRegionRect = rRgn.ImplGetNextRect( aInfo, nX, nY, nWidth, nHeight );
238 //}
239 //rRgn = aMirroredRegion;
240 }
241}
242
243void SalGraphics::mirror( tools::Rectangle& rRect, const OutputDevice& rOutDev, bool bBack ) const
244{
245 tools::Long nWidth = rRect.GetWidth();
246 tools::Long x = rRect.Left();
247 tools::Long x_org = x;
248
249 mirror( x, nWidth, rOutDev, bBack );
250 rRect.Move( x - x_org, 0 );
251}
252
254{
255 const basegfx::B2DHomMatrix& rMirror(getMirror(i_rOutDev));
256
257 if(rMirror.isIdentity())
258 {
259 return i_rPoly;
260 }
261 else
262 {
263 basegfx::B2DPolyPolygon aRet(i_rPoly);
264 aRet.transform(rMirror);
265 aRet.flip();
266 return aRet;
267 }
268}
269
271{
272 if (rOutDev.ImplIsAntiparallel())
273 {
276 else
278 }
280 return MirrorMode::BiDi;
281 return MirrorMode::NONE;
282}
283
285{
286 // get mirroring transformation
287 MirrorMode eNewMirrorMode = GetMirrorMode(i_rOutDev);
288 tools::Long nTranslate(0);
289
290 switch (eNewMirrorMode)
291 {
293 {
294 const tools::Long w = GetDeviceWidth(i_rOutDev);
295 SAL_WARN_IF(!w, "vcl", "missing graphics width");
296 nTranslate = w - i_rOutDev.GetOutputWidthPixel() - (2 * i_rOutDev.GetOutOffXPixel());
297 break;
298 }
300 {
301 nTranslate = i_rOutDev.GetOutputWidthPixel() + (2 * i_rOutDev.GetOutOffXPixel()) - 1;
302 break;
303 }
304 case MirrorMode::BiDi:
305 {
306 const tools::Long w = GetDeviceWidth(i_rOutDev);
307 SAL_WARN_IF(!w, "vcl", "missing graphics width");
308 nTranslate = w - 1;
309 break;
310 }
311 case MirrorMode::NONE:
312 break;
313 }
314
315 // if the translation (due to device width), or mirror state of the device changed, then m_aLastMirror is invalid
316 bool bLastMirrorValid = eNewMirrorMode == m_eLastMirrorMode && nTranslate == m_nLastMirrorTranslation;
317 if (!bLastMirrorValid)
318 {
319 const_cast<SalGraphics*>(this)->m_nLastMirrorTranslation = nTranslate;
320 const_cast<SalGraphics*>(this)->m_eLastMirrorMode = eNewMirrorMode;
321
322 switch (eNewMirrorMode)
323 {
324 // mirror this window back
326 {
327 /* This path gets exercised in calc's RTL UI (e.g. SAL_RTL_ENABLED=1)
328 with its LTR horizontal scrollbar */
329
330 // Original code was:
331 // double devX = w-i_rOutDev.GetOutputWidthPixel()-i_rOutDev.GetOutOffXPixel(); // re-mirrored mnOutOffX
332 // aRet.setX( devX + (i_rPoint.getX() - i_rOutDev.GetOutOffXPixel()) );
334 nTranslate, 0.0);
335 break;
336 }
338 {
339 /* This path gets exercised in writers's LTR UI with a RTL horizontal
340 scrollbar, cross-reference dialog populated from contents from a
341 RTL document tdf#131725 */
342
343 // Original code was;
344 // tools::Long devX = rOutDev.GetOutOffXPixel(); // re-mirrored mnOutOffX
345 // x = rOutDev.GetOutputWidthPixel() - (x - devX) + rOutDev.GetOutOffXPixel() - 1;
347 -1.0,
348 1.0,
349 nTranslate,
350 0.0);
351 break;
352 }
353 case MirrorMode::BiDi:
354 {
355 // Original code was:
356 // aRet.setX( w-1-i_rPoint.getX() );
357 // -mirror X -> scale(-1.0, 1.0)
358 // -translate X -> translate(w-1, 0)
359 // Checked this one, works as expected.
361 -1.0,
362 1.0,
363 nTranslate,
364 0.0);
365 break;
366 }
367 case MirrorMode::NONE:
368 const_cast<SalGraphics*>(this)->m_aLastMirror.identity();
369 break;
370 }
371 }
372
373 return m_aLastMirror;
374}
375
376void SalGraphics::SetClipRegion( const vcl::Region& i_rClip, const OutputDevice& rOutDev )
377{
378 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
379 {
380 vcl::Region aMirror( i_rClip );
381 mirror( aMirror, rOutDev );
382 setClipRegion( aMirror );
383 }
384 else
385 {
386 setClipRegion( i_rClip );
387 }
388}
389
391{
392 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
393 mirror( nX, rOutDev );
394 drawPixel( nX, nY );
395}
396
398{
399 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
400 mirror( nX, rOutDev );
401 drawPixel( nX, nY, nColor );
402}
403
405{
406 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
407 {
408 mirror( nX1, rOutDev );
409 mirror( nX2, rOutDev );
410 }
411 drawLine( nX1, nY1, nX2, nY2 );
412}
413
415{
416 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
417 mirror( nX, nWidth, rOutDev );
418 drawRect( nX, nY, nWidth, nHeight );
419}
420
421void SalGraphics::DrawPolyLine( sal_uInt32 nPoints, Point const * pPtAry, const OutputDevice& rOutDev )
422{
423 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
424 {
425 std::unique_ptr<Point[]> pPtAry2(new Point[nPoints]);
426 bool bCopied = mirror( nPoints, pPtAry, pPtAry2.get(), rOutDev );
427 drawPolyLine( nPoints, bCopied ? pPtAry2.get() : pPtAry );
428 }
429 else
430 drawPolyLine( nPoints, pPtAry );
431}
432
433void SalGraphics::DrawPolygon( sal_uInt32 nPoints, const Point* pPtAry, const OutputDevice& rOutDev )
434{
435 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
436 {
437 std::unique_ptr<Point[]> pPtAry2(new Point[nPoints]);
438 bool bCopied = mirror( nPoints, pPtAry, pPtAry2.get(), rOutDev );
439 drawPolygon( nPoints, bCopied ? pPtAry2.get() : pPtAry );
440 }
441 else
442 drawPolygon( nPoints, pPtAry );
443}
444
445void SalGraphics::DrawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, const Point** pPtAry, const OutputDevice& rOutDev )
446{
447 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
448 {
449 // TODO: optimize, reduce new/delete calls
450 std::unique_ptr<Point*[]> pPtAry2( new Point*[nPoly] );
451 sal_uLong i;
452 for(i=0; i<nPoly; i++)
453 {
454 sal_uLong nPoints = pPoints[i];
455 pPtAry2[i] = new Point[ nPoints ];
456 mirror( nPoints, pPtAry[i], pPtAry2[i], rOutDev );
457 }
458
459 drawPolyPolygon( nPoly, pPoints, const_cast<const Point**>(pPtAry2.get()) );
460
461 for(i=0; i<nPoly; i++)
462 delete [] pPtAry2[i];
463 }
464 else
465 drawPolyPolygon( nPoly, pPoints, pPtAry );
466}
467
468namespace
469{
470 basegfx::B2DHomMatrix createTranslateToMirroredBounds(const basegfx::B2DRange &rBoundingBox, const basegfx::B2DHomMatrix& rMirror)
471 {
472 basegfx::B2DRange aRTLBoundingBox(rBoundingBox);
473 aRTLBoundingBox *= rMirror;
474 return basegfx::utils::createTranslateB2DHomMatrix(aRTLBoundingBox.getMinX() - rBoundingBox.getMinX(), 0);
475 }
476}
477
479 const basegfx::B2DHomMatrix& rObjectToDevice,
480 const basegfx::B2DPolyPolygon& i_rPolyPolygon,
481 double i_fTransparency,
482 const OutputDevice& i_rOutDev)
483{
484 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || i_rOutDev.IsRTLEnabled() )
485 {
486 // mirroring set
487 const basegfx::B2DHomMatrix& rMirror(getMirror(i_rOutDev));
488 if(!rMirror.isIdentity())
489 {
490 return drawPolyPolygon(
491 rMirror * rObjectToDevice,
492 i_rPolyPolygon,
493 i_fTransparency);
494 }
495 }
496
497 return drawPolyPolygon(
498 rObjectToDevice,
499 i_rPolyPolygon,
500 i_fTransparency);
501}
502
503bool SalGraphics::DrawPolyLineBezier( sal_uInt32 nPoints, const Point* pPtAry, const PolyFlags* pFlgAry, const OutputDevice& rOutDev )
504{
505 bool bResult = false;
506 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
507 {
508 std::unique_ptr<Point[]> pPtAry2(new Point[nPoints]);
509 bool bCopied = mirror( nPoints, pPtAry, pPtAry2.get(), rOutDev );
510 bResult = drawPolyLineBezier( nPoints, bCopied ? pPtAry2.get() : pPtAry, pFlgAry );
511 }
512 else
513 bResult = drawPolyLineBezier( nPoints, pPtAry, pFlgAry );
514 return bResult;
515}
516
517bool SalGraphics::DrawPolygonBezier( sal_uInt32 nPoints, const Point* pPtAry, const PolyFlags* pFlgAry, const OutputDevice& rOutDev )
518{
519 bool bResult = false;
520 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
521 {
522 std::unique_ptr<Point[]> pPtAry2(new Point[nPoints]);
523 bool bCopied = mirror( nPoints, pPtAry, pPtAry2.get(), rOutDev );
524 bResult = drawPolygonBezier( nPoints, bCopied ? pPtAry2.get() : pPtAry, pFlgAry );
525 }
526 else
527 bResult = drawPolygonBezier( nPoints, pPtAry, pFlgAry );
528 return bResult;
529}
530
531bool SalGraphics::DrawPolyPolygonBezier( sal_uInt32 i_nPoly, const sal_uInt32* i_pPoints,
532 const Point* const* i_pPtAry, const PolyFlags* const* i_pFlgAry, const OutputDevice& i_rOutDev )
533{
534 bool bRet = false;
535 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || i_rOutDev.IsRTLEnabled() )
536 {
537 // TODO: optimize, reduce new/delete calls
538 std::unique_ptr<Point*[]> pPtAry2( new Point*[i_nPoly] );
539 sal_uLong i;
540 for(i=0; i<i_nPoly; i++)
541 {
542 sal_uLong nPoints = i_pPoints[i];
543 pPtAry2[i] = new Point[ nPoints ];
544 mirror( nPoints, i_pPtAry[i], pPtAry2[i], i_rOutDev );
545 }
546
547 bRet = drawPolyPolygonBezier( i_nPoly, i_pPoints, const_cast<const Point* const *>(pPtAry2.get()), i_pFlgAry );
548
549 for(i=0; i<i_nPoly; i++)
550 delete [] pPtAry2[i];
551 }
552 else
553 bRet = drawPolyPolygonBezier( i_nPoly, i_pPoints, i_pPtAry, i_pFlgAry );
554 return bRet;
555}
556
558 const basegfx::B2DHomMatrix& rObjectToDevice,
559 const basegfx::B2DPolygon& i_rPolygon,
560 double i_fTransparency,
561 double i_rLineWidth,
562 const std::vector< double >* i_pStroke, // MM01
563 basegfx::B2DLineJoin i_eLineJoin,
564 css::drawing::LineCap i_eLineCap,
565 double i_fMiterMinimumAngle,
566 bool bPixelSnapHairline,
567 const OutputDevice& i_rOutDev)
568{
569 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || i_rOutDev.IsRTLEnabled() )
570 {
571 // mirroring set
572 const basegfx::B2DHomMatrix& rMirror(getMirror(i_rOutDev));
573 if(!rMirror.isIdentity())
574 {
575 return drawPolyLine(
576 rMirror * rObjectToDevice,
577 i_rPolygon,
578 i_fTransparency,
579 i_rLineWidth,
580 i_pStroke, // MM01
581 i_eLineJoin,
582 i_eLineCap,
583 i_fMiterMinimumAngle,
584 bPixelSnapHairline);
585 }
586 }
587
588 // no mirroring set (or identity), use standard call
589 return drawPolyLine(
590 rObjectToDevice,
591 i_rPolygon,
592 i_fTransparency,
593 i_rLineWidth,
594 i_pStroke, // MM01
595 i_eLineJoin,
596 i_eLineCap,
597 i_fMiterMinimumAngle,
598 bPixelSnapHairline);
599}
600
601bool SalGraphics::DrawGradient(const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient, const OutputDevice& rOutDev)
602{
603 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
604 {
605 tools::PolyPolygon aMirrored(mirror(rPolyPoly.getB2DPolyPolygon(), rOutDev));
606 return drawGradient(aMirrored, rGradient);
607 }
608
609 return drawGradient( rPolyPoly, rGradient );
610}
611
613 tools::Long nSrcX, tools::Long nSrcY,
614 tools::Long nSrcWidth, tools::Long nSrcHeight,
615 const OutputDevice& rOutDev )
616{
617 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
618 {
619 mirror( nDestX, nSrcWidth, rOutDev );
620 mirror( nSrcX, nSrcWidth, rOutDev );
621 }
622 copyArea( nDestX, nDestY, nSrcX, nSrcY, nSrcWidth, nSrcHeight, true/*bWindowInvalidate*/ );
623}
624
625void SalGraphics::CopyBits(const SalTwoRect& rPosAry, const OutputDevice& rOutDev)
626{
627 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
628 {
629 SalTwoRect aPosAry2 = rPosAry;
630 mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, rOutDev );
631 copyBits( aPosAry2, nullptr );
632 }
633 else
634 copyBits( rPosAry, nullptr );
635}
636
637void SalGraphics::CopyBits(const SalTwoRect& rPosAry, SalGraphics& rSrcGraphics,
638 const OutputDevice& rOutDev, const OutputDevice& rSrcOutDev)
639{
640 if( ( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() ) ||
641 ( (rSrcGraphics.GetLayout() & SalLayoutFlags::BiDiRtl) || rSrcOutDev.IsRTLEnabled()) )
642 {
643 SalTwoRect aPosAry2 = rPosAry;
644 if( (rSrcGraphics.GetLayout() & SalLayoutFlags::BiDiRtl) || rSrcOutDev.IsRTLEnabled() )
645 mirror( aPosAry2.mnSrcX, aPosAry2.mnSrcWidth, rSrcOutDev );
646 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
647 mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, rOutDev );
648 copyBits( aPosAry2, &rSrcGraphics );
649 }
650 else
651 copyBits( rPosAry, &rSrcGraphics );
652}
653
655 const SalBitmap& rSalBitmap, const OutputDevice& rOutDev )
656{
657 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
658 {
659 SalTwoRect aPosAry2 = rPosAry;
660 mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, rOutDev );
661 drawBitmap( aPosAry2, rSalBitmap );
662 }
663 else
664 drawBitmap( rPosAry, rSalBitmap );
665}
666
668 const SalBitmap& rSalBitmap,
669 const SalBitmap& rTransparentBitmap, const OutputDevice& rOutDev )
670{
671 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
672 {
673 SalTwoRect aPosAry2 = rPosAry;
674 mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, rOutDev );
675 drawBitmap( aPosAry2, rSalBitmap, rTransparentBitmap );
676 }
677 else
678 drawBitmap( rPosAry, rSalBitmap, rTransparentBitmap );
679}
680
682 const SalBitmap& rSalBitmap,
683 Color nMaskColor, const OutputDevice& rOutDev )
684{
685 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
686 {
687 SalTwoRect aPosAry2 = rPosAry;
688 mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, rOutDev );
689 drawMask( aPosAry2, rSalBitmap, nMaskColor );
690 }
691 else
692 drawMask( rPosAry, rSalBitmap, nMaskColor );
693}
694
695std::shared_ptr<SalBitmap> SalGraphics::GetBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const OutputDevice& rOutDev )
696{
697 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
698 mirror( nX, nWidth, rOutDev );
699 return getBitmap( nX, nY, nWidth, nHeight );
700}
701
703{
704 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
705 mirror( nX, rOutDev );
706 return getPixel( nX, nY );
707}
708
709void SalGraphics::Invert( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags, const OutputDevice& rOutDev )
710{
711 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
712 mirror( nX, nWidth, rOutDev );
713 invert( nX, nY, nWidth, nHeight, nFlags );
714}
715
716void SalGraphics::Invert( sal_uInt32 nPoints, const Point* pPtAry, SalInvert nFlags, const OutputDevice& rOutDev )
717{
718 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
719 {
720 std::unique_ptr<Point[]> pPtAry2(new Point[nPoints]);
721 bool bCopied = mirror( nPoints, pPtAry, pPtAry2.get(), rOutDev );
722 invert( nPoints, bCopied ? pPtAry2.get() : pPtAry, nFlags );
723 }
724 else
725 invert( nPoints, pPtAry, nFlags );
726}
727
728bool SalGraphics::DrawEPS( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void* pPtr, sal_uInt32 nSize, const OutputDevice& rOutDev )
729{
730 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
731 mirror( nX, nWidth, rOutDev );
732 return drawEPS( nX, nY, nWidth, nHeight, pPtr, nSize );
733}
734
736 const Point& aPos, bool& rIsInside, const OutputDevice& rOutDev)
737{
738 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
739 {
740 Point pt( aPos );
741 tools::Rectangle rgn( rControlRegion );
742 pt.setX( mirror2( pt.X(), rOutDev ) );
743 mirror( rgn, rOutDev );
744 return forWidget()->hitTestNativeControl( ControlType::Scrollbar, nPart, rgn, pt, rIsInside );
745 }
746 else
747 return forWidget()->hitTestNativeControl( ControlType::Scrollbar, nPart, rControlRegion, aPos, rIsInside );
748}
749
750void SalGraphics::mirror( ImplControlValue& rVal, const OutputDevice& rOutDev ) const
751{
752 switch( rVal.getType() )
753 {
755 {
756 SliderValue* pSlVal = static_cast<SliderValue*>(&rVal);
757 mirror(pSlVal->maThumbRect, rOutDev);
758 }
759 break;
761 {
762 ScrollbarValue* pScVal = static_cast<ScrollbarValue*>(&rVal);
763 mirror(pScVal->maThumbRect, rOutDev);
764 mirror(pScVal->maButton1Rect, rOutDev);
765 mirror(pScVal->maButton2Rect, rOutDev);
766 }
767 break;
770 {
771 SpinbuttonValue* pSpVal = static_cast<SpinbuttonValue*>(&rVal);
772 mirror(pSpVal->maUpperRect, rOutDev);
773 mirror(pSpVal->maLowerRect, rOutDev);
774 }
775 break;
777 {
778 ToolbarValue* pTVal = static_cast<ToolbarValue*>(&rVal);
779 mirror(pTVal->maGripRect, rOutDev);
780 }
781 break;
782 default: break;
783 }
784}
785
787 ControlState nState, const ImplControlValue& aValue,
788 const OUString& aCaption, const OutputDevice& rOutDev,
789 const Color& rBackgroundColor)
790{
791 bool bRet = false;
792 tools::Rectangle aControlRegion(rControlRegion);
793 if (aControlRegion.IsEmpty() || aControlRegion.GetWidth() <= 0 || aControlRegion.GetHeight() <= 0)
794 return bRet;
795
796 bool bLayoutRTL = true && (m_nLayout & SalLayoutFlags::BiDiRtl);
797 bool bDevRTL = rOutDev.IsRTLEnabled();
799 if( (bLayoutRTL || bDevRTL) && !bIsLOK )
800 {
801 mirror(aControlRegion, rOutDev);
802 std::unique_ptr< ImplControlValue > mirrorValue( aValue.clone());
803 mirror( *mirrorValue, rOutDev );
804 bRet = forWidget()->drawNativeControl(nType, nPart, aControlRegion, nState, *mirrorValue, aCaption, rBackgroundColor);
805 }
806 else
807 bRet = forWidget()->drawNativeControl(nType, nPart, aControlRegion, nState, aValue, aCaption, rBackgroundColor);
808
809 if (bRet && m_pWidgetDraw)
810 handleDamage(aControlRegion);
811 return bRet;
812}
813
815 const ImplControlValue& aValue,
816 tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion, const OutputDevice& rOutDev )
817{
818 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
819 {
820 tools::Rectangle rgn( rControlRegion );
821 mirror( rgn, rOutDev );
822 std::unique_ptr< ImplControlValue > mirrorValue( aValue.clone());
823 mirror( *mirrorValue, rOutDev );
824 if (forWidget()->getNativeControlRegion(nType, nPart, rgn, nState, *mirrorValue, OUString(), rNativeBoundingRegion, rNativeContentRegion))
825 {
826 mirror( rNativeBoundingRegion, rOutDev, true );
827 mirror( rNativeContentRegion, rOutDev, true );
828 return true;
829 }
830 return false;
831 }
832 else
833 return forWidget()->getNativeControlRegion(nType, nPart, rControlRegion, nState, aValue, OUString(), rNativeBoundingRegion, rNativeContentRegion);
834}
835
837 const SalBitmap& rBitmap,
838 const OutputDevice& rOutDev )
839{
840 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
841 {
842 SalTwoRect aPosAry2 = rPosAry;
843 mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, rOutDev );
844 return blendBitmap( aPosAry2, rBitmap );
845 }
846 else
847 return blendBitmap( rPosAry, rBitmap );
848}
849
851 const SalBitmap& rSrcBitmap,
852 const SalBitmap& rMaskBitmap,
853 const SalBitmap& rAlphaBitmap,
854 const OutputDevice& rOutDev )
855{
856 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
857 {
858 SalTwoRect aPosAry2 = rPosAry;
859 mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, rOutDev );
860 return blendAlphaBitmap( aPosAry2, rSrcBitmap, rMaskBitmap, rAlphaBitmap );
861 }
862 else
863 return blendAlphaBitmap( rPosAry, rSrcBitmap, rMaskBitmap, rAlphaBitmap );
864}
865
867 const SalBitmap& rSourceBitmap,
868 const SalBitmap& rAlphaBitmap,
869 const OutputDevice& rOutDev )
870{
871 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
872 {
873 SalTwoRect aPosAry2 = rPosAry;
874 mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, rOutDev );
875 return drawAlphaBitmap( aPosAry2, rSourceBitmap, rAlphaBitmap );
876 }
877 else
878 return drawAlphaBitmap( rPosAry, rSourceBitmap, rAlphaBitmap );
879}
880
882 const basegfx::B2DPoint& rNull,
883 const basegfx::B2DPoint& rX,
884 const basegfx::B2DPoint& rY,
885 const SalBitmap& rSourceBitmap,
886 const SalBitmap* pAlphaBitmap,
887 double fAlpha,
888 const OutputDevice& rOutDev)
889{
890 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
891 {
892 // mirroring set
893 const basegfx::B2DHomMatrix& rMirror(getMirror(rOutDev));
894 if (!rMirror.isIdentity())
895 {
896 basegfx::B2DPolygon aPoints({rNull, rX, rY});
897 basegfx::B2DRange aBoundingBox(aPoints.getB2DRange());
898 auto aTranslateToMirroredBounds = createTranslateToMirroredBounds(aBoundingBox, rMirror);
899
900 basegfx::B2DPoint aNull = aTranslateToMirroredBounds * rNull;
901 basegfx::B2DPoint aX = aTranslateToMirroredBounds * rX;
902 basegfx::B2DPoint aY = aTranslateToMirroredBounds * rY;
903
904 return drawTransformedBitmap(aNull, aX, aY, rSourceBitmap, pAlphaBitmap, fAlpha);
905 }
906 }
907
908 return drawTransformedBitmap(rNull, rX, rY, rSourceBitmap, pAlphaBitmap, fAlpha);
909}
910
912{
914}
915
917 sal_uInt8 nTransparency, const OutputDevice& rOutDev )
918{
919 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
920 mirror( nX, nWidth, rOutDev );
921
922 return drawAlphaRect( nX, nY, nWidth, nHeight, nTransparency );
923}
924
926{
927 if (GetImpl())
928 return GetImpl()->getRenderBackendName();
929 return OUString();
930}
931
933{
934 if (pScaleOut)
937}
938
939/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SalLayoutFlags
ControlType
These types are all based on the supported variants vcl/salnativewidgets.hxx and must be kept in-sync...
static bool GetLayoutRTL()
ControlType getType() const
virtual ImplControlValue * clone() const
Some things multiple-inherit from VclAbstractDialog and OutputDevice, so we need to use virtual inher...
Definition: outdev.hxx:170
SAL_DLLPRIVATE bool ImplIsAntiparallel() const
Definition: outdev.cxx:655
tools::Long GetOutputWidthPixel() const
Definition: outdev.hxx:316
bool IsRTLEnabled() const
Definition: outdev.hxx:1269
tools::Long GetOutOffXPixel() const
Definition: outdev.hxx:318
virtual bool IsVirtual() const
Definition: outdev.cxx:185
void setX(tools::Long nX)
void setY(tools::Long nY)
constexpr tools::Long getX() const
A SalFrame is a system window (e.g. an X11 window).
Definition: salframe.hxx:115
SalFrameGeometry maGeometry
absolute, unmirrored values
Definition: salframe.hxx:127
virtual SalFrame * GetParent() const =0
SalFrameGeometry GetGeometry() const
virtual OUString getRenderBackendName() const =0
void DrawMask(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, Color nMaskColor, const OutputDevice &rOutDev)
virtual void copyBits(const SalTwoRect &rPosAry, SalGraphics *pSrcGraphics)=0
bool initWidgetDrawBackends(bool bForce=false)
virtual void invert(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags)=0
virtual bool drawEPS(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void *pPtr, sal_uInt32 nSize)=0
virtual void drawPixel(tools::Long nX, tools::Long nY)=0
bool DrawNativeControl(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, const OUString &aCaption, const OutputDevice &rOutDev, const Color &rBackgroundColor=COL_AUTO)
tools::Long mirror2(tools::Long nX, const OutputDevice &rOutDev) const
std::shared_ptr< SalBitmap > GetBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const OutputDevice &rOutDev)
tools::Long GetDeviceWidth(const OutputDevice &rOutDev) const
void SetClipRegion(const vcl::Region &, const OutputDevice &rOutDev)
void mirror(tools::Long &nX, const OutputDevice &rOutDev) const
virtual void drawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point **pPtAry)=0
virtual bool drawTransformedBitmap(const basegfx::B2DPoint &rNull, const basegfx::B2DPoint &rX, const basegfx::B2DPoint &rY, const SalBitmap &rSourceBitmap, const SalBitmap *pAlphaBitmap, double fAlpha)=0
draw transformed bitmap (maybe with alpha) where Null, X, Y define the coordinate system
bool DrawTransformedBitmap(const basegfx::B2DPoint &rNull, const basegfx::B2DPoint &rX, const basegfx::B2DPoint &rY, const SalBitmap &rSourceBitmap, const SalBitmap *pAlphaBitmap, double fAlpha, const OutputDevice &rOutDev)
SalLayoutFlags GetLayout() const
Definition: salgdi.hxx:170
virtual void drawRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight)=0
virtual void handleDamage(const tools::Rectangle &rDamagedRegion)
Handle damage done by drawing with a widget draw override.
Definition: salgdi.hxx:643
virtual Color getPixel(tools::Long nX, tools::Long nY)=0
void DrawPixel(tools::Long nX, tools::Long nY, const OutputDevice &rOutDev)
virtual bool drawPolyPolygonBezier(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point *const *pPtAry, const PolyFlags *const *pFlgAry)=0
~SalGraphics() COVERITY_NOEXCEPT_FALSE override
bool DrawEPS(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void *pPtr, sal_uInt32 nSize, const OutputDevice &rOutDev)
vcl::WidgetDrawInterface * forWidget()
Definition: salgdi.hxx:630
virtual bool hasFastDrawTransformedBitmap() const =0
Returns true if the drawTransformedBitmap() call is fast, and so it should be used directly without t...
virtual SalGraphicsImpl * GetImpl() const =0
virtual void drawPolygon(sal_uInt32 nPoints, const Point *pPtAry)=0
virtual tools::Long GetGraphicsWidth() const =0
void DrawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2, const OutputDevice &rOutDev)
std::unique_ptr< vcl::WidgetDrawInterface > m_pWidgetDraw
Definition: salgdi.hxx:629
virtual std::shared_ptr< SalBitmap > getBitmap(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight)=0
virtual void drawPolyLine(sal_uInt32 nPoints, const Point *pPtAry)=0
bool BlendAlphaBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSalSrcBitmap, const SalBitmap &rSalMaskBitmap, const SalBitmap &rSalAlphaBitmap, const OutputDevice &rOutDev)
void CopyBits(const SalTwoRect &rPosAry, const OutputDevice &rOutDev)
bool GetNativeControlRegion(ControlType nType, ControlPart nPart, const tools::Rectangle &rControlRegion, ControlState nState, const ImplControlValue &aValue, tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion, const OutputDevice &rOutDev)
bool DrawGradient(const tools::PolyPolygon &rPolyPoly, const Gradient &rGradient, const OutputDevice &rOutDev)
bool DrawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt8 nTransparency, const OutputDevice &rOutDev)
void Invert(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags, const OutputDevice &rOutDev)
virtual void drawBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap)=0
void DrawRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const OutputDevice &rOutDev)
virtual bool drawAlphaRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, sal_uInt8 nTransparency)=0
Render solid rectangle with given transparency.
virtual void drawMask(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, Color nMaskColor)=0
virtual bool blendBitmap(const SalTwoRect &, const SalBitmap &rBitmap)=0
Blend the bitmap with the current buffer.
Color GetPixel(tools::Long nX, tools::Long nY, const OutputDevice &rOutDev)
void DrawPolyLine(sal_uInt32 nPoints, Point const *pPtAry, const OutputDevice &rOutDev)
basegfx::B2DHomMatrix m_aLastMirror
Definition: salgdi.hxx:606
bool DrawPolyLineBezier(sal_uInt32 nPoints, const Point *pPtAry, const PolyFlags *pFlgAry, const OutputDevice &rOutDev)
bool HasFastDrawTransformedBitmap() const
bool DrawPolyPolygonBezier(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point *const *pPtAry, const PolyFlags *const *pFlgAry, const OutputDevice &rOutDev)
bool HitTestNativeScrollbar(ControlPart nPart, const tools::Rectangle &rControlRegion, const Point &aPos, bool &rIsInside, const OutputDevice &rOutDev)
bool DrawPolygonBezier(sal_uInt32 nPoints, const Point *pPtAry, const PolyFlags *pFlgAry, const OutputDevice &rOutDev)
void DrawBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, const OutputDevice &rOutDev)
virtual void setClipRegion(const vcl::Region &)=0
void CopyArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY, tools::Long nSrcWidth, tools::Long nSrcHeight, const OutputDevice &rOutDev)
virtual void drawLine(tools::Long nX1, tools::Long nY1, tools::Long nX2, tools::Long nY2)=0
virtual bool drawPolyLineBezier(sal_uInt32 nPoints, const Point *pPtAry, const PolyFlags *pFlgAry)=0
virtual OUString getRenderBackendName() const
MirrorMode m_eLastMirrorMode
Definition: salgdi.hxx:604
virtual bool drawPolygonBezier(sal_uInt32 nPoints, const Point *pPtAry, const PolyFlags *pFlgAry)=0
MirrorMode GetMirrorMode(const OutputDevice &rOutDev) const
tools::Long m_nLastMirrorTranslation
Definition: salgdi.hxx:605
const basegfx::B2DHomMatrix & getMirror(const OutputDevice &rOutDev) const
virtual bool drawAlphaBitmap(const SalTwoRect &, const SalBitmap &rSourceBitmap, const SalBitmap &rAlphaBitmap)=0
Render bitmap with alpha channel.
virtual bool ShouldDownscaleIconsAtSurface(double *pScaleOut) const
bool BlendBitmap(const SalTwoRect &rPosAry, const SalBitmap &rSalBitmap, const OutputDevice &rOutDev)
virtual bool blendAlphaBitmap(const SalTwoRect &, const SalBitmap &rSrcBitmap, const SalBitmap &rMaskBitmap, const SalBitmap &rAlphaBitmap)=0
Draw the bitmap by blending using the mask and alpha channel.
virtual bool drawGradient(const tools::PolyPolygon &rPolyPoly, const Gradient &rGradient)=0
void DrawPolyPolygon(sal_uInt32 nPoly, const sal_uInt32 *pPoints, const Point **pPtAry, const OutputDevice &rOutDev)
bool DrawAlphaBitmap(const SalTwoRect &, const SalBitmap &rSourceBitmap, const SalBitmap &rAlphaBitmap, const OutputDevice &rOutDev)
SalLayoutFlags m_nLayout
Definition: salgdi.hxx:594
void DrawPolygon(sal_uInt32 nPoints, const Point *pPtAry, const OutputDevice &rOutDev)
virtual void copyArea(tools::Long nDestX, tools::Long nDestY, tools::Long nSrcX, tools::Long nSrcY, tools::Long nSrcWidth, tools::Long nSrcHeight, bool bWindowInvalidate)=0
tools::Rectangle maThumbRect
tools::Rectangle maButton1Rect
tools::Rectangle maButton2Rect
tools::Rectangle maThumbRect
tools::Rectangle maLowerRect
tools::Rectangle maUpperRect
tools::Rectangle maGripRect
bool isIdentity() const
void transform(const basegfx::B2DHomMatrix &rMatrix)
TYPE getMinX() const
::basegfx::B2DPolyPolygon getB2DPolyPolygon() const
constexpr tools::Long GetWidth() const
void Move(tools::Long nHorzMoveDelta, tools::Long nVertMoveDelta)
constexpr tools::Long GetHeight() const
constexpr tools::Long Left() const
constexpr bool IsEmpty() const
basegfx::B2DPolyPolygon GetAsB2DPolyPolygon() const
Definition: region.cxx:1294
bool HasPolyPolygonOrB2DPolyPolygon() const
Definition: region.hxx:107
void Union(const tools::Rectangle &rRegion)
Definition: region.cxx:507
void GetRegionRectangles(RectangleVector &rTarget) const
Definition: region.cxx:1674
void SetEmpty()
Definition: region.cxx:1422
virtual bool hitTestNativeControl(ControlType eType, ControlPart ePart, const tools::Rectangle &rBoundingControlRegion, const Point &aPos, bool &rIsInside)
Query if a position is inside the native widget part.
virtual bool getNativeControlRegion(ControlType eType, ControlPart ePart, const tools::Rectangle &rBoundingControlRegion, ControlState eState, const ImplControlValue &aValue, const OUString &aCaption, tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion)
Get the native control regions for the control part.
virtual bool drawNativeControl(ControlType eType, ControlPart ePart, const tools::Rectangle &rBoundingControlRegion, ControlState eState, const ImplControlValue &aValue, const OUString &aCaptions, const Color &rBackgroundColor)
Draw the requested control.
void setX(sal_Int32 nX)
constexpr sal_Int32 x() const
constexpr sal_Int32 width() const
float x
sal_Int32 nState
#define SAL_WARN_IF(condition, area, stream)
def rectangle(l)
NONE
B2DHomMatrix createScaleTranslateB2DHomMatrix(double fScaleX, double fScaleY, double fTranslateX, double fTranslateY)
B2DHomMatrix createTranslateB2DHomMatrix(double fTranslateX, double fTranslateY)
int i
long Long
sal_Int32 w
PolyFlags
QPRO_FUNC_TYPE nType
std::vector< tools::Rectangle > RectangleVector
Definition: region.hxx:34
SalInvert
Definition: salgtype.hxx:73
sal_uIntPtr sal_uLong
tools::Long mnSrcX
Definition: salgtype.hxx:39
tools::Long mnDestWidth
Definition: salgtype.hxx:45
tools::Long mnSrcWidth
Definition: salgtype.hxx:41
tools::Long mnDestX
Definition: salgtype.hxx:43
unsigned char sal_uInt8