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 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
376bool 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 return setClipRegion( aMirror );
383 }
384 return setClipRegion( i_rClip );
385}
386
388{
389 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
390 mirror( nX, rOutDev );
391 drawPixel( nX, nY );
392}
393
395{
396 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
397 mirror( nX, rOutDev );
398 drawPixel( nX, nY, nColor );
399}
400
402{
403 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
404 {
405 mirror( nX1, rOutDev );
406 mirror( nX2, rOutDev );
407 }
408 drawLine( nX1, nY1, nX2, nY2 );
409}
410
412{
413 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
414 mirror( nX, nWidth, rOutDev );
415 drawRect( nX, nY, nWidth, nHeight );
416}
417
418void SalGraphics::DrawPolyLine( sal_uInt32 nPoints, Point const * pPtAry, const OutputDevice& rOutDev )
419{
420 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
421 {
422 std::unique_ptr<Point[]> pPtAry2(new Point[nPoints]);
423 bool bCopied = mirror( nPoints, pPtAry, pPtAry2.get(), rOutDev );
424 drawPolyLine( nPoints, bCopied ? pPtAry2.get() : pPtAry );
425 }
426 else
427 drawPolyLine( nPoints, pPtAry );
428}
429
430void SalGraphics::DrawPolygon( sal_uInt32 nPoints, const Point* pPtAry, const OutputDevice& rOutDev )
431{
432 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
433 {
434 std::unique_ptr<Point[]> pPtAry2(new Point[nPoints]);
435 bool bCopied = mirror( nPoints, pPtAry, pPtAry2.get(), rOutDev );
436 drawPolygon( nPoints, bCopied ? pPtAry2.get() : pPtAry );
437 }
438 else
439 drawPolygon( nPoints, pPtAry );
440}
441
442void SalGraphics::DrawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, const Point** pPtAry, const OutputDevice& rOutDev )
443{
444 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
445 {
446 // TODO: optimize, reduce new/delete calls
447 std::unique_ptr<Point*[]> pPtAry2( new Point*[nPoly] );
448 sal_uLong i;
449 for(i=0; i<nPoly; i++)
450 {
451 sal_uLong nPoints = pPoints[i];
452 pPtAry2[i] = new Point[ nPoints ];
453 mirror( nPoints, pPtAry[i], pPtAry2[i], rOutDev );
454 }
455
456 drawPolyPolygon( nPoly, pPoints, const_cast<const Point**>(pPtAry2.get()) );
457
458 for(i=0; i<nPoly; i++)
459 delete [] pPtAry2[i];
460 }
461 else
462 drawPolyPolygon( nPoly, pPoints, pPtAry );
463}
464
465namespace
466{
467 basegfx::B2DHomMatrix createTranslateToMirroredBounds(const basegfx::B2DRange &rBoundingBox, const basegfx::B2DHomMatrix& rMirror)
468 {
469 basegfx::B2DRange aRTLBoundingBox(rBoundingBox);
470 aRTLBoundingBox *= rMirror;
471 return basegfx::utils::createTranslateB2DHomMatrix(aRTLBoundingBox.getMinX() - rBoundingBox.getMinX(), 0);
472 }
473}
474
476 const basegfx::B2DHomMatrix& rObjectToDevice,
477 const basegfx::B2DPolyPolygon& i_rPolyPolygon,
478 double i_fTransparency,
479 const OutputDevice& i_rOutDev)
480{
481 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || i_rOutDev.IsRTLEnabled() )
482 {
483 // mirroring set
484 const basegfx::B2DHomMatrix& rMirror(getMirror(i_rOutDev));
485 if(!rMirror.isIdentity())
486 {
487 return drawPolyPolygon(
488 rMirror * rObjectToDevice,
489 i_rPolyPolygon,
490 i_fTransparency);
491 }
492 }
493
494 return drawPolyPolygon(
495 rObjectToDevice,
496 i_rPolyPolygon,
497 i_fTransparency);
498}
499
500bool SalGraphics::DrawPolyLineBezier( sal_uInt32 nPoints, const Point* pPtAry, const PolyFlags* pFlgAry, const OutputDevice& rOutDev )
501{
502 bool bResult = false;
503 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
504 {
505 std::unique_ptr<Point[]> pPtAry2(new Point[nPoints]);
506 bool bCopied = mirror( nPoints, pPtAry, pPtAry2.get(), rOutDev );
507 bResult = drawPolyLineBezier( nPoints, bCopied ? pPtAry2.get() : pPtAry, pFlgAry );
508 }
509 else
510 bResult = drawPolyLineBezier( nPoints, pPtAry, pFlgAry );
511 return bResult;
512}
513
514bool SalGraphics::DrawPolygonBezier( sal_uInt32 nPoints, const Point* pPtAry, const PolyFlags* pFlgAry, const OutputDevice& rOutDev )
515{
516 bool bResult = false;
517 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
518 {
519 std::unique_ptr<Point[]> pPtAry2(new Point[nPoints]);
520 bool bCopied = mirror( nPoints, pPtAry, pPtAry2.get(), rOutDev );
521 bResult = drawPolygonBezier( nPoints, bCopied ? pPtAry2.get() : pPtAry, pFlgAry );
522 }
523 else
524 bResult = drawPolygonBezier( nPoints, pPtAry, pFlgAry );
525 return bResult;
526}
527
528bool SalGraphics::DrawPolyPolygonBezier( sal_uInt32 i_nPoly, const sal_uInt32* i_pPoints,
529 const Point* const* i_pPtAry, const PolyFlags* const* i_pFlgAry, const OutputDevice& i_rOutDev )
530{
531 bool bRet = false;
532 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || i_rOutDev.IsRTLEnabled() )
533 {
534 // TODO: optimize, reduce new/delete calls
535 std::unique_ptr<Point*[]> pPtAry2( new Point*[i_nPoly] );
536 sal_uLong i;
537 for(i=0; i<i_nPoly; i++)
538 {
539 sal_uLong nPoints = i_pPoints[i];
540 pPtAry2[i] = new Point[ nPoints ];
541 mirror( nPoints, i_pPtAry[i], pPtAry2[i], i_rOutDev );
542 }
543
544 bRet = drawPolyPolygonBezier( i_nPoly, i_pPoints, const_cast<const Point* const *>(pPtAry2.get()), i_pFlgAry );
545
546 for(i=0; i<i_nPoly; i++)
547 delete [] pPtAry2[i];
548 }
549 else
550 bRet = drawPolyPolygonBezier( i_nPoly, i_pPoints, i_pPtAry, i_pFlgAry );
551 return bRet;
552}
553
555 const basegfx::B2DHomMatrix& rObjectToDevice,
556 const basegfx::B2DPolygon& i_rPolygon,
557 double i_fTransparency,
558 double i_rLineWidth,
559 const std::vector< double >* i_pStroke, // MM01
560 basegfx::B2DLineJoin i_eLineJoin,
561 css::drawing::LineCap i_eLineCap,
562 double i_fMiterMinimumAngle,
563 bool bPixelSnapHairline,
564 const OutputDevice& i_rOutDev)
565{
566 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || i_rOutDev.IsRTLEnabled() )
567 {
568 // mirroring set
569 const basegfx::B2DHomMatrix& rMirror(getMirror(i_rOutDev));
570 if(!rMirror.isIdentity())
571 {
572 return drawPolyLine(
573 rMirror * rObjectToDevice,
574 i_rPolygon,
575 i_fTransparency,
576 i_rLineWidth,
577 i_pStroke, // MM01
578 i_eLineJoin,
579 i_eLineCap,
580 i_fMiterMinimumAngle,
581 bPixelSnapHairline);
582 }
583 }
584
585 // no mirroring set (or identity), use standard call
586 return drawPolyLine(
587 rObjectToDevice,
588 i_rPolygon,
589 i_fTransparency,
590 i_rLineWidth,
591 i_pStroke, // MM01
592 i_eLineJoin,
593 i_eLineCap,
594 i_fMiterMinimumAngle,
595 bPixelSnapHairline);
596}
597
598bool SalGraphics::DrawGradient(const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient, const OutputDevice& rOutDev)
599{
600 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
601 {
602 tools::PolyPolygon aMirrored(mirror(rPolyPoly.getB2DPolyPolygon(), rOutDev));
603 return drawGradient(aMirrored, rGradient);
604 }
605
606 return drawGradient( rPolyPoly, rGradient );
607}
608
610 tools::Long nSrcX, tools::Long nSrcY,
611 tools::Long nSrcWidth, tools::Long nSrcHeight,
612 const OutputDevice& rOutDev )
613{
614 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
615 {
616 mirror( nDestX, nSrcWidth, rOutDev );
617 mirror( nSrcX, nSrcWidth, rOutDev );
618 }
619 copyArea( nDestX, nDestY, nSrcX, nSrcY, nSrcWidth, nSrcHeight, true/*bWindowInvalidate*/ );
620}
621
622void SalGraphics::CopyBits(const SalTwoRect& rPosAry, const OutputDevice& rOutDev)
623{
624 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
625 {
626 SalTwoRect aPosAry2 = rPosAry;
627 mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, rOutDev );
628 copyBits( aPosAry2, nullptr );
629 }
630 else
631 copyBits( rPosAry, nullptr );
632}
633
634void SalGraphics::CopyBits(const SalTwoRect& rPosAry, SalGraphics& rSrcGraphics,
635 const OutputDevice& rOutDev, const OutputDevice& rSrcOutDev)
636{
637 if( ( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() ) ||
638 ( (rSrcGraphics.GetLayout() & SalLayoutFlags::BiDiRtl) || rSrcOutDev.IsRTLEnabled()) )
639 {
640 SalTwoRect aPosAry2 = rPosAry;
641 if( (rSrcGraphics.GetLayout() & SalLayoutFlags::BiDiRtl) || rSrcOutDev.IsRTLEnabled() )
642 mirror( aPosAry2.mnSrcX, aPosAry2.mnSrcWidth, rSrcOutDev );
643 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
644 mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, rOutDev );
645 copyBits( aPosAry2, &rSrcGraphics );
646 }
647 else
648 copyBits( rPosAry, &rSrcGraphics );
649}
650
652 const SalBitmap& rSalBitmap, const OutputDevice& rOutDev )
653{
654 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
655 {
656 SalTwoRect aPosAry2 = rPosAry;
657 mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, rOutDev );
658 drawBitmap( aPosAry2, rSalBitmap );
659 }
660 else
661 drawBitmap( rPosAry, rSalBitmap );
662}
663
665 const SalBitmap& rSalBitmap,
666 const SalBitmap& rTransparentBitmap, const OutputDevice& rOutDev )
667{
668 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
669 {
670 SalTwoRect aPosAry2 = rPosAry;
671 mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, rOutDev );
672 drawBitmap( aPosAry2, rSalBitmap, rTransparentBitmap );
673 }
674 else
675 drawBitmap( rPosAry, rSalBitmap, rTransparentBitmap );
676}
677
679 const SalBitmap& rSalBitmap,
680 Color nMaskColor, const OutputDevice& rOutDev )
681{
682 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
683 {
684 SalTwoRect aPosAry2 = rPosAry;
685 mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, rOutDev );
686 drawMask( aPosAry2, rSalBitmap, nMaskColor );
687 }
688 else
689 drawMask( rPosAry, rSalBitmap, nMaskColor );
690}
691
692std::shared_ptr<SalBitmap> SalGraphics::GetBitmap( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, const OutputDevice& rOutDev )
693{
694 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
695 mirror( nX, nWidth, rOutDev );
696 return getBitmap( nX, nY, nWidth, nHeight );
697}
698
700{
701 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
702 mirror( nX, rOutDev );
703 return getPixel( nX, nY );
704}
705
706void SalGraphics::Invert( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, SalInvert nFlags, const OutputDevice& rOutDev )
707{
708 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
709 mirror( nX, nWidth, rOutDev );
710 invert( nX, nY, nWidth, nHeight, nFlags );
711}
712
713void SalGraphics::Invert( sal_uInt32 nPoints, const Point* pPtAry, SalInvert nFlags, const OutputDevice& rOutDev )
714{
715 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
716 {
717 std::unique_ptr<Point[]> pPtAry2(new Point[nPoints]);
718 bool bCopied = mirror( nPoints, pPtAry, pPtAry2.get(), rOutDev );
719 invert( nPoints, bCopied ? pPtAry2.get() : pPtAry, nFlags );
720 }
721 else
722 invert( nPoints, pPtAry, nFlags );
723}
724
725bool SalGraphics::DrawEPS( tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, void* pPtr, sal_uInt32 nSize, const OutputDevice& rOutDev )
726{
727 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
728 mirror( nX, nWidth, rOutDev );
729 return drawEPS( nX, nY, nWidth, nHeight, pPtr, nSize );
730}
731
733 const Point& aPos, bool& rIsInside, const OutputDevice& rOutDev)
734{
735 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
736 {
737 Point pt( aPos );
738 tools::Rectangle rgn( rControlRegion );
739 pt.setX( mirror2( pt.X(), rOutDev ) );
740 mirror( rgn, rOutDev );
741 return forWidget()->hitTestNativeControl( ControlType::Scrollbar, nPart, rgn, pt, rIsInside );
742 }
743 else
744 return forWidget()->hitTestNativeControl( ControlType::Scrollbar, nPart, rControlRegion, aPos, rIsInside );
745}
746
747void SalGraphics::mirror( ImplControlValue& rVal, const OutputDevice& rOutDev ) const
748{
749 switch( rVal.getType() )
750 {
752 {
753 SliderValue* pSlVal = static_cast<SliderValue*>(&rVal);
754 mirror(pSlVal->maThumbRect, rOutDev);
755 }
756 break;
758 {
759 ScrollbarValue* pScVal = static_cast<ScrollbarValue*>(&rVal);
760 mirror(pScVal->maThumbRect, rOutDev);
761 mirror(pScVal->maButton1Rect, rOutDev);
762 mirror(pScVal->maButton2Rect, rOutDev);
763 }
764 break;
767 {
768 SpinbuttonValue* pSpVal = static_cast<SpinbuttonValue*>(&rVal);
769 mirror(pSpVal->maUpperRect, rOutDev);
770 mirror(pSpVal->maLowerRect, rOutDev);
771 }
772 break;
774 {
775 ToolbarValue* pTVal = static_cast<ToolbarValue*>(&rVal);
776 mirror(pTVal->maGripRect, rOutDev);
777 }
778 break;
779 default: break;
780 }
781}
782
784 ControlState nState, const ImplControlValue& aValue,
785 const OUString& aCaption, const OutputDevice& rOutDev,
786 const Color& rBackgroundColor)
787{
788 bool bRet = false;
789 tools::Rectangle aControlRegion(rControlRegion);
790 if (aControlRegion.IsEmpty() || aControlRegion.GetWidth() <= 0 || aControlRegion.GetHeight() <= 0)
791 return bRet;
792
793 bool bLayoutRTL = true && (m_nLayout & SalLayoutFlags::BiDiRtl);
794 bool bDevRTL = rOutDev.IsRTLEnabled();
796 if( (bLayoutRTL || bDevRTL) && !bIsLOK )
797 {
798 mirror(aControlRegion, rOutDev);
799 std::unique_ptr< ImplControlValue > mirrorValue( aValue.clone());
800 mirror( *mirrorValue, rOutDev );
801 bRet = forWidget()->drawNativeControl(nType, nPart, aControlRegion, nState, *mirrorValue, aCaption, rBackgroundColor);
802 }
803 else
804 bRet = forWidget()->drawNativeControl(nType, nPart, aControlRegion, nState, aValue, aCaption, rBackgroundColor);
805
806 if (bRet && m_pWidgetDraw)
807 handleDamage(aControlRegion);
808 return bRet;
809}
810
812 const ImplControlValue& aValue,
813 tools::Rectangle &rNativeBoundingRegion, tools::Rectangle &rNativeContentRegion, const OutputDevice& rOutDev )
814{
815 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
816 {
817 tools::Rectangle rgn( rControlRegion );
818 mirror( rgn, rOutDev );
819 std::unique_ptr< ImplControlValue > mirrorValue( aValue.clone());
820 mirror( *mirrorValue, rOutDev );
821 if (forWidget()->getNativeControlRegion(nType, nPart, rgn, nState, *mirrorValue, OUString(), rNativeBoundingRegion, rNativeContentRegion))
822 {
823 mirror( rNativeBoundingRegion, rOutDev, true );
824 mirror( rNativeContentRegion, rOutDev, true );
825 return true;
826 }
827 return false;
828 }
829 else
830 return forWidget()->getNativeControlRegion(nType, nPart, rControlRegion, nState, aValue, OUString(), rNativeBoundingRegion, rNativeContentRegion);
831}
832
834 const SalBitmap& rBitmap,
835 const OutputDevice& rOutDev )
836{
837 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
838 {
839 SalTwoRect aPosAry2 = rPosAry;
840 mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, rOutDev );
841 return blendBitmap( aPosAry2, rBitmap );
842 }
843 else
844 return blendBitmap( rPosAry, rBitmap );
845}
846
848 const SalBitmap& rSrcBitmap,
849 const SalBitmap& rMaskBitmap,
850 const SalBitmap& rAlphaBitmap,
851 const OutputDevice& rOutDev )
852{
853 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
854 {
855 SalTwoRect aPosAry2 = rPosAry;
856 mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, rOutDev );
857 return blendAlphaBitmap( aPosAry2, rSrcBitmap, rMaskBitmap, rAlphaBitmap );
858 }
859 else
860 return blendAlphaBitmap( rPosAry, rSrcBitmap, rMaskBitmap, rAlphaBitmap );
861}
862
864 const SalBitmap& rSourceBitmap,
865 const SalBitmap& rAlphaBitmap,
866 const OutputDevice& rOutDev )
867{
868 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
869 {
870 SalTwoRect aPosAry2 = rPosAry;
871 mirror( aPosAry2.mnDestX, aPosAry2.mnDestWidth, rOutDev );
872 return drawAlphaBitmap( aPosAry2, rSourceBitmap, rAlphaBitmap );
873 }
874 else
875 return drawAlphaBitmap( rPosAry, rSourceBitmap, rAlphaBitmap );
876}
877
879 const basegfx::B2DPoint& rNull,
880 const basegfx::B2DPoint& rX,
881 const basegfx::B2DPoint& rY,
882 const SalBitmap& rSourceBitmap,
883 const SalBitmap* pAlphaBitmap,
884 double fAlpha,
885 const OutputDevice& rOutDev)
886{
887 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
888 {
889 // mirroring set
890 const basegfx::B2DHomMatrix& rMirror(getMirror(rOutDev));
891 if (!rMirror.isIdentity())
892 {
893 basegfx::B2DPolygon aPoints({rNull, rX, rY});
894 basegfx::B2DRange aBoundingBox(aPoints.getB2DRange());
895 auto aTranslateToMirroredBounds = createTranslateToMirroredBounds(aBoundingBox, rMirror);
896
897 basegfx::B2DPoint aNull = aTranslateToMirroredBounds * rNull;
898 basegfx::B2DPoint aX = aTranslateToMirroredBounds * rX;
899 basegfx::B2DPoint aY = aTranslateToMirroredBounds * rY;
900
901 return drawTransformedBitmap(aNull, aX, aY, rSourceBitmap, pAlphaBitmap, fAlpha);
902 }
903 }
904
905 return drawTransformedBitmap(rNull, rX, rY, rSourceBitmap, pAlphaBitmap, fAlpha);
906}
907
909{
911}
912
914 sal_uInt8 nTransparency, const OutputDevice& rOutDev )
915{
916 if( (m_nLayout & SalLayoutFlags::BiDiRtl) || rOutDev.IsRTLEnabled() )
917 mirror( nX, nWidth, rOutDev );
918
919 return drawAlphaRect( nX, nY, nWidth, nHeight, nTransparency );
920}
921
923{
924 if (GetImpl())
925 return GetImpl()->getRenderBackendName();
926 return OUString();
927}
928
930{
931 if (pScaleOut)
934}
935
936/* 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:171
SAL_DLLPRIVATE bool ImplIsAntiparallel() const
Definition: outdev.cxx:656
tools::Long GetOutputWidthPixel() const
Definition: outdev.hxx:317
bool IsRTLEnabled() const
Definition: outdev.hxx:1270
tools::Long GetOutOffXPixel() const
Definition: outdev.hxx:319
virtual bool IsVirtual() const
Definition: outdev.cxx:186
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 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:179
virtual void drawRect(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight)=0
virtual bool setClipRegion(const vcl::Region &)=0
virtual void handleDamage(const tools::Rectangle &rDamagedRegion)
Handle damage done by drawing with a widget draw override.
Definition: salgdi.hxx:652
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:639
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:638
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:615
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)
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:613
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:614
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.
bool SetClipRegion(const vcl::Region &, const OutputDevice &rOutDev)
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:603
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:74
sal_uIntPtr sal_uLong
tools::Long mnSrcX
Definition: salgtype.hxx:40
tools::Long mnDestWidth
Definition: salgtype.hxx:46
tools::Long mnSrcWidth
Definition: salgtype.hxx:42
tools::Long mnDestX
Definition: salgtype.hxx:44
unsigned char sal_uInt8