LibreOffice Module drawinglayer (master) 1
graphicprimitivehelper2d.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 <algorithm>
23
36
37// helper class for animated graphics
38
39#include <utility>
41#include <vcl/graph.hxx>
42#include <vcl/virdev.hxx>
43#include <vcl/svapp.hxx>
46
48{
49 namespace {
50
51 class AnimatedGraphicPrimitive2D : public AnimatedSwitchPrimitive2D
52 {
53 private:
56
63
66
70
71 // index of the next frame that would be regularly prepared
73
76
78 std::vector<Primitive2DReference> maBufferedPrimitives;
80
84
86 bool isValidData() const
87 {
88 return (GraphicType::Bitmap == maGraphic.GetType()
90 && maAnimation.Count());
91 }
92
93 void ensureVirtualDeviceSizeAndState()
94 {
95 if (!isValidData())
96 return;
97
98 const Size aCurrent(maVirtualDevice->GetOutputSizePixel());
99 const Size aTarget(maAnimation.GetDisplaySizePixel());
100
101 if (aCurrent != aTarget)
102 {
103 maVirtualDevice->EnableMapMode(false);
104 maVirtualDeviceMask->EnableMapMode(false);
105 maVirtualDevice->SetOutputSizePixel(aTarget);
106 maVirtualDeviceMask->SetOutputSizePixel(aTarget);
107 }
108
109 maVirtualDevice->Erase();
110 maVirtualDeviceMask->Erase();
111 const ::tools::Rectangle aRect(Point(0, 0), aTarget);
112 maVirtualDeviceMask->SetFillColor(COL_BLACK);
113 maVirtualDeviceMask->SetLineColor();
114 maVirtualDeviceMask->DrawRect(aRect);
115 }
116
117 sal_uInt32 generateStepTime(sal_uInt32 nIndex) const
118 {
119 const AnimationFrame& rAnimationFrame = maAnimation.Get(sal_uInt16(nIndex));
120 sal_uInt32 nWaitTime(rAnimationFrame.mnWait * 10);
121
122 // Take care of special value for MultiPage TIFFs. ATM these shall just
123 // show their first page. Later we will offer some switching when object
124 // is selected.
125 if (ANIMATION_TIMEOUT_ON_CLICK == rAnimationFrame.mnWait)
126 {
127 // ATM the huge value would block the timer, so
128 // use a long time to show first page (whole day)
129 nWaitTime = 100 * 60 * 60 * 24;
130 }
131
132 // Bad trap: There are animated gifs with no set WaitTime (!).
133 // In that case use a default value.
134 if (0 == nWaitTime)
135 {
136 nWaitTime = 100;
137 }
138
139 return nWaitTime;
140 }
141
142 void createAndSetAnimationTiming()
143 {
144 if (!isValidData())
145 return;
146
147 animation::AnimationEntryLoop aAnimationLoop(maAnimation.GetLoopCount() ? maAnimation.GetLoopCount() : 0xffff);
148 const sal_uInt32 nCount(maAnimation.Count());
149
150 for (sal_uInt32 a(0); a < nCount; a++)
151 {
152 const sal_uInt32 aStepTime(generateStepTime(a));
153 const animation::AnimationEntryFixed aTime(static_cast<double>(aStepTime), static_cast<double>(a) / static_cast<double>(nCount));
154
155 aAnimationLoop.append(aTime);
156 }
157
158 animation::AnimationEntryList aAnimationEntryList;
159 aAnimationEntryList.append(aAnimationLoop);
160
161 setAnimationEntry(aAnimationEntryList);
162 }
163
164 Primitive2DReference createFromBuffer() const
165 {
166 // create BitmapEx by extracting from VirtualDevices
167 const Bitmap aMainBitmap(maVirtualDevice->GetBitmap(Point(), maVirtualDevice->GetOutputSizePixel()));
168 bool useAlphaMask = false;
169#if defined(MACOSX) || defined(IOS)
170 useAlphaMask = true;
171#else
172 // GetBitmap()-> AlphaMask is optimized with SkiaSalBitmap::InterpretAs8Bit(), 1bpp mask is not.
174 useAlphaMask = true;
175#endif
176 BitmapEx bitmap;
177 if( useAlphaMask )
178 {
179 const AlphaMask aMaskBitmap(maVirtualDeviceMask->GetBitmap(Point(), maVirtualDeviceMask->GetOutputSizePixel()));
180 bitmap = BitmapEx(aMainBitmap, aMaskBitmap);
181 }
182 else
183 {
184 const Bitmap aMaskBitmap(maVirtualDeviceMask->GetBitmap(Point(), maVirtualDeviceMask->GetOutputSizePixel()));
185 bitmap = BitmapEx(aMainBitmap, aMaskBitmap);
186 }
187
189 new BitmapPrimitive2D(
190 bitmap,
191 getTransform()));
192 }
193
194 void checkSafeToBuffer(sal_uInt32 nIndex)
195 {
197 {
198 // all frames buffered
199 if (!maBufferedPrimitives.empty() && nIndex < maBufferedPrimitives.size())
200 {
201 if (!maBufferedPrimitives[nIndex].is())
202 {
203 maBufferedPrimitives[nIndex] = createFromBuffer();
204
205 // check if buffering is complete
206 bool bBufferingComplete(true);
207
208 for (auto const & a: maBufferedPrimitives)
209 {
210 if (!a.is())
211 {
212 bBufferingComplete = false;
213 break;
214 }
215 }
216
217 if (bBufferingComplete)
218 {
221 }
222 }
223 }
224 }
225 else
226 {
227 // always buffer first frame
228 if (0 == nIndex && !maBufferedFirstFrame.is())
229 {
230 maBufferedFirstFrame = createFromBuffer();
231 }
232 }
233 }
234
235 void createFrame(sal_uInt32 nTarget)
236 {
237 // mnNextFrameToPrepare is the target frame to create next (which implies that
238 // mnNextFrameToPrepare-1 *is* currently in the VirtualDevice when
239 // 0 != mnNextFrameToPrepare. nTarget is the target frame.
240 if (!isValidData())
241 return;
242
243 if (mnNextFrameToPrepare > nTarget)
244 {
245 // we are ahead request, reset mechanism to start at frame zero
246 ensureVirtualDeviceSizeAndState();
248 }
249
250 while (mnNextFrameToPrepare <= nTarget)
251 {
252 // prepare step
253 const AnimationFrame& rAnimationFrame = maAnimation.Get(sal_uInt16(mnNextFrameToPrepare));
254
255 bool bSourceBlending = rAnimationFrame.meBlend == Blend::Source;
256
257 if (bSourceBlending)
258 {
259 tools::Rectangle aArea(rAnimationFrame.maPositionPixel, rAnimationFrame.maBitmapEx.GetSizePixel());
260 maVirtualDevice->Erase(aArea);
261 maVirtualDeviceMask->Erase(aArea);
262 }
263
264 switch (rAnimationFrame.meDisposal)
265 {
266 case Disposal::Not:
267 {
268 maVirtualDevice->DrawBitmapEx(rAnimationFrame.maPositionPixel, rAnimationFrame.maBitmapEx);
269 AlphaMask aAlphaMask = rAnimationFrame.maBitmapEx.GetAlphaMask();
270
271 if (aAlphaMask.IsEmpty())
272 {
273 const Point aEmpty;
274 const ::tools::Rectangle aRect(aEmpty, maVirtualDeviceMask->GetOutputSizePixel());
275 const Wallpaper aWallpaper(COL_BLACK);
276 maVirtualDeviceMask->DrawWallpaper(aRect, aWallpaper);
277 }
278 else
279 {
280 BitmapEx aExpandVisibilityMask(aAlphaMask, aAlphaMask);
281 maVirtualDeviceMask->DrawBitmapEx(rAnimationFrame.maPositionPixel, aExpandVisibilityMask);
282 }
283
284 break;
285 }
286 case Disposal::Back:
287 {
288 // #i70772# react on no mask, for primitives, too.
289 const AlphaMask & rMask(rAnimationFrame.maBitmapEx.GetAlphaMask());
290
291 maVirtualDeviceMask->Erase();
292 maVirtualDevice->DrawBitmapEx(rAnimationFrame.maPositionPixel, rAnimationFrame.maBitmapEx);
293
294 if (rMask.IsEmpty())
295 {
296 const ::tools::Rectangle aRect(rAnimationFrame.maPositionPixel, rAnimationFrame.maBitmapEx.GetSizePixel());
297 maVirtualDeviceMask->SetFillColor(COL_BLACK);
298 maVirtualDeviceMask->SetLineColor();
299 maVirtualDeviceMask->DrawRect(aRect);
300 }
301 else
302 {
303 BitmapEx aExpandVisibilityMask(rMask, rMask);
304 maVirtualDeviceMask->DrawBitmapEx(rAnimationFrame.maPositionPixel, aExpandVisibilityMask);
305 }
306
307 break;
308 }
309 case Disposal::Previous:
310 {
311 maVirtualDevice->DrawBitmapEx(rAnimationFrame.maPositionPixel, rAnimationFrame.maBitmapEx);
312 BitmapEx aExpandVisibilityMask(rAnimationFrame.maBitmapEx.GetAlphaMask(), rAnimationFrame.maBitmapEx.GetAlphaMask());
313 maVirtualDeviceMask->DrawBitmapEx(rAnimationFrame.maPositionPixel, aExpandVisibilityMask);
314 break;
315 }
316 }
317
318 // to not waste created data, check adding to buffers
319 checkSafeToBuffer(mnNextFrameToPrepare);
320
322 }
323 }
324
325 Primitive2DReference tryTogetFromBuffer(sal_uInt32 nIndex) const
326 {
328 {
329 // all frames buffered, check if available
330 if (!maBufferedPrimitives.empty() && nIndex < maBufferedPrimitives.size())
331 {
332 if (maBufferedPrimitives[nIndex].is())
333 {
335 }
336 }
337 }
338 else
339 {
340 // always buffer first frame, it's sometimes requested out-of-order
341 if (0 == nIndex && maBufferedFirstFrame.is())
342 {
344 }
345 }
346
347 return Primitive2DReference();
348 }
349
350 public:
352 AnimatedGraphicPrimitive2D(
353 const Graphic& rGraphic,
354 basegfx::B2DHomMatrix aTransform);
355
357 const basegfx::B2DHomMatrix& getTransform() const { return maTransform; }
358
360 virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
361
363 virtual void get2DDecomposition(Primitive2DDecompositionVisitor& rVisitor, const geometry::ViewInformation2D& rViewInformation) const override;
364 };
365
366 }
367
368 AnimatedGraphicPrimitive2D::AnimatedGraphicPrimitive2D(
369 const Graphic& rGraphic,
370 basegfx::B2DHomMatrix aTransform)
371 : AnimatedSwitchPrimitive2D(
372 animation::AnimationEntryList(),
373 Primitive2DContainer(),
374 false),
375 maTransform(std::move(aTransform)),
376 maGraphic(rGraphic),
377 maAnimation(rGraphic.GetAnimation()),
378 maVirtualDevice(*Application::GetDefaultDevice()),
379 maVirtualDeviceMask(*Application::GetDefaultDevice()),
381 mbBufferingAllowed(false),
382 mbHugeSize(false)
383 {
384 // initialize AnimationTiming, needed to detect which frame is requested
385 // in get2DDecomposition
386 createAndSetAnimationTiming();
387
388 // check if we allow buffering
389 if (isValidData())
390 {
391 // allow buffering up to a size of:
392 // - 64 frames
393 // - sizes of 256x256 pixels
394 // This may be offered in option values if needed
395 static const sal_uInt64 nAllowedSize(64 * 256 * 256);
396 static const sal_uInt64 nHugeSize(10000000);
397 const Size aTarget(maAnimation.GetDisplaySizePixel());
398 const sal_uInt64 nUsedSize(static_cast<sal_uInt64>(maAnimation.Count()) * aTarget.Width() * aTarget.Height());
399
400 if (nUsedSize < nAllowedSize)
401 {
402 mbBufferingAllowed = true;
403 }
404
405 if (nUsedSize > nHugeSize)
406 {
407 mbHugeSize = true;
408 }
409 }
410
411 // prepare buffer space
412 if (mbBufferingAllowed && isValidData())
413 {
415 }
416 }
417
418 bool AnimatedGraphicPrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
419 {
420 // do not use 'GroupPrimitive2D::operator==' here, that would compare
421 // the children. Also do not use 'BasePrimitive2D::operator==', that would
422 // check the ID-Type. Since we are a simple derivation without own ID,
423 // use the dynamic_cast RTTI directly
424 const AnimatedGraphicPrimitive2D* pCompare = dynamic_cast<const AnimatedGraphicPrimitive2D*>(&rPrimitive);
425
426 // use operator== of Graphic - if that is equal, the basic definition is equal
427 return (nullptr != pCompare
428 && getTransform() == pCompare->getTransform()
429 && maGraphic == pCompare->maGraphic);
430 }
431
432 void AnimatedGraphicPrimitive2D::get2DDecomposition(Primitive2DDecompositionVisitor& rVisitor, const geometry::ViewInformation2D& rViewInformation) const
433 {
434 if (!isValidData())
435 return;
436
437 Primitive2DReference aRetval;
438 const double fState(getAnimationEntry().getStateAtTime(rViewInformation.getViewTime()));
439 const sal_uInt32 nLen(maAnimation.Count());
440 sal_uInt32 nIndex(basegfx::fround(fState * static_cast<double>(nLen)));
441
442 // nIndex is the requested frame - it is in range [0..nLen[
443 // create frame representation in VirtualDevices
444 if (nIndex >= nLen)
445 {
446 nIndex = nLen - 1;
447 }
448
449 // check buffering shortcuts, may already be created
450 aRetval = tryTogetFromBuffer(nIndex);
451
452 if (aRetval.is())
453 {
454 rVisitor.visit(aRetval);
455 return;
456 }
457
458 // if huge size (and not the buffered 1st frame) simply
459 // create next frame
460 if (mbHugeSize && 0 != nIndex && mnNextFrameToPrepare <= nIndex)
461 {
463 }
464
465 // frame not (yet) buffered or no buffering allowed, create it
466 const_cast<AnimatedGraphicPrimitive2D*>(this)->createFrame(nIndex);
467
468 // try to get from buffer again, may have been added from createFrame
469 aRetval = tryTogetFromBuffer(nIndex);
470
471 if (aRetval.is())
472 {
473 rVisitor.visit(aRetval);
474 return;
475 }
476
477 // did not work (not buffered and not 1st frame), create from buffer
478 aRetval = createFromBuffer();
479
480 rVisitor.visit(aRetval);
481 }
482
483} // end of namespace
484
486{
488 Primitive2DContainer& rContainer,
489 const Graphic& rGraphic,
490 const basegfx::B2DHomMatrix& rTransform)
491 {
492 Primitive2DContainer aRetval;
493
494 switch(rGraphic.GetType())
495 {
496 case GraphicType::Bitmap :
497 {
498 if(rGraphic.IsAnimated())
499 {
500 // prepare specialized AnimatedGraphicPrimitive2D
501 aRetval.resize(1);
502 aRetval[0] = new AnimatedGraphicPrimitive2D(
503 rGraphic,
504 rTransform);
505 }
506 else if(rGraphic.getVectorGraphicData())
507 {
508 // embedded Vector Graphic Data fill, create embed transform
509 const basegfx::B2DRange& rSvgRange(rGraphic.getVectorGraphicData()->getRange());
510
511 if(basegfx::fTools::more(rSvgRange.getWidth(), 0.0) && basegfx::fTools::more(rSvgRange.getHeight(), 0.0))
512 {
513 // translate back to origin, scale to unit coordinates
514 basegfx::B2DHomMatrix aEmbedVectorGraphic(
516 -rSvgRange.getMinX(),
517 -rSvgRange.getMinY()));
518
519 aEmbedVectorGraphic.scale(
520 1.0 / rSvgRange.getWidth(),
521 1.0 / rSvgRange.getHeight());
522
523 // apply created object transformation
524 aEmbedVectorGraphic = rTransform * aEmbedVectorGraphic;
525
526 // add Vector Graphic Data primitives embedded
527 aRetval.resize(1);
528 aRetval[0] = new TransformPrimitive2D(
529 aEmbedVectorGraphic,
530 Primitive2DContainer(rGraphic.getVectorGraphicData()->getPrimitive2DSequence()));
531 }
532 }
533 else
534 {
535 aRetval.resize(1);
536 aRetval[0] = new BitmapPrimitive2D(
537 rGraphic.GetBitmapEx(),
538 rTransform);
539 }
540
541 break;
542 }
543
544 case GraphicType::GdiMetafile :
545 {
546 // create MetafilePrimitive2D
547 const GDIMetaFile& rMetafile = rGraphic.GetGDIMetaFile();
548
549 aRetval.resize(1);
550 aRetval[0] = new MetafilePrimitive2D(
551 rTransform,
552 rMetafile);
553
554 // #i100357# find out if clipping is needed for this primitive. Unfortunately,
555 // there exist Metafiles who's content is bigger than the proposed PrefSize set
556 // at them. This is an error, but we need to work around this
557 const Size aMetaFilePrefSize(rMetafile.GetPrefSize());
558 const Size aMetaFileRealSize(
559 rMetafile.GetBoundRect(
561
562 if(aMetaFileRealSize.getWidth() > aMetaFilePrefSize.getWidth()
563 || aMetaFileRealSize.getHeight() > aMetaFilePrefSize.getHeight())
564 {
565 // clipping needed. Embed to MaskPrimitive2D. Create children and mask polygon
567 aMaskPolygon.transform(rTransform);
568
570 basegfx::B2DPolyPolygon(aMaskPolygon),
571 std::move(aRetval));
572 aRetval = Primitive2DContainer { mask };
573 }
574 break;
575 }
576
577 default:
578 {
579 // nothing to create
580 break;
581 }
582 }
583
584 rContainer.append(std::move(aRetval));
585 }
586
588 Primitive2DContainer&& rChildren,
589 GraphicDrawMode aGraphicDrawMode,
590 double fLuminance,
591 double fContrast,
592 double fRed,
593 double fGreen,
594 double fBlue,
595 double fGamma,
596 bool bInvert)
597 {
598 Primitive2DContainer aRetval;
599
600 if(rChildren.empty())
601 {
602 // no child content, done
603 return aRetval;
604 }
605
606 // set child content as retval; that is what will be used as child content in all
607 // embeddings from here
608 aRetval = std::move(rChildren);
609
610 if(GraphicDrawMode::Watermark == aGraphicDrawMode)
611 {
612 // this is solved by applying fixed values additionally to luminance
613 // and contrast, do it here and reset DrawMode to GraphicDrawMode::Standard
614 // original in svtools uses:
615 // #define WATERMARK_LUM_OFFSET 50
616 // #define WATERMARK_CON_OFFSET -70
617 fLuminance = std::clamp(fLuminance + 0.5, -1.0, 1.0);
618 fContrast = std::clamp(fContrast - 0.7, -1.0, 1.0);
619 aGraphicDrawMode = GraphicDrawMode::Standard;
620 }
621
622 // DrawMode (GraphicDrawMode::Watermark already handled)
623 switch(aGraphicDrawMode)
624 {
625 case GraphicDrawMode::Greys:
626 {
627 // convert to grey
628 const Primitive2DReference aPrimitiveGrey(
630 std::move(aRetval),
631 std::make_shared<basegfx::BColorModifier_gray>()));
632
633 aRetval = Primitive2DContainer { aPrimitiveGrey };
634 break;
635 }
636 case GraphicDrawMode::Mono:
637 {
638 // convert to mono (black/white with threshold 0.5)
639 const Primitive2DReference aPrimitiveBlackAndWhite(
641 std::move(aRetval),
642 std::make_shared<basegfx::BColorModifier_black_and_white>(0.5)));
643
644 aRetval = Primitive2DContainer { aPrimitiveBlackAndWhite };
645 break;
646 }
647 default: // case GraphicDrawMode::Standard:
648 {
649 assert(
650 aGraphicDrawMode != GraphicDrawMode::Watermark
651 && "OOps, GraphicDrawMode::Watermark should already be handled (see above)");
652 // nothing to do
653 break;
654 }
655 }
656
657 // mnContPercent, mnLumPercent, mnRPercent, mnGPercent, mnBPercent
658 // handled in a single call
659 if(!basegfx::fTools::equalZero(fLuminance)
660 || !basegfx::fTools::equalZero(fContrast)
664 {
665 const Primitive2DReference aPrimitiveRGBLuminannceContrast(
667 std::move(aRetval),
668 std::make_shared<basegfx::BColorModifier_RGBLuminanceContrast>(
669 fRed,
670 fGreen,
671 fBlue,
672 fLuminance,
673 fContrast)));
674
675 aRetval = Primitive2DContainer { aPrimitiveRGBLuminannceContrast };
676 }
677
678 // gamma (boolean)
679 if(!basegfx::fTools::equal(fGamma, 1.0))
680 {
681 const Primitive2DReference aPrimitiveGamma(
683 std::move(aRetval),
684 std::make_shared<basegfx::BColorModifier_gamma>(
685 fGamma)));
686
687 aRetval = Primitive2DContainer { aPrimitiveGamma };
688 }
689
690 // invert (boolean)
691 if(bInvert)
692 {
693 const Primitive2DReference aPrimitiveInvert(
695 std::move(aRetval),
696 std::make_shared<basegfx::BColorModifier_invert>()));
697
698 aRetval = Primitive2DContainer { aPrimitiveInvert };
699 }
700
701 return aRetval;
702 }
703
704} // end of namespace
705
706/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
GraphicDrawMode
bool IsEmpty() const
size_t Count() const
const Size & GetDisplaySizePixel() const
const AnimationFrame & Get(sal_uInt16 nAnimation) const
sal_uInt32 GetLoopCount() const
static OutputDevice * GetDefaultDevice()
const AlphaMask & GetAlphaMask() const
const Size & GetSizePixel() const
const Size & GetPrefSize() const
tools::Rectangle GetBoundRect(OutputDevice &i_rReference) const
const GDIMetaFile & GetGDIMetaFile() const
GraphicType GetType() const
bool IsAnimated() const
BitmapEx GetBitmapEx(const GraphicConversionParameters &rParameters=GraphicConversionParameters()) const
const std::shared_ptr< VectorGraphicData > & getVectorGraphicData() const
constexpr tools::Long getHeight() const
constexpr tools::Long getWidth() const
void disposeAndClear()
void scale(double fX, double fY)
void transform(const basegfx::B2DHomMatrix &rMatrix)
TYPE getWidth() const
TYPE getMinX() const
TYPE getMinY() const
TYPE getHeight() const
constexpr Size GetSize() const
int nCount
sal_uInt32 mnNextFrameToPrepare
std::vector< Primitive2DReference > maBufferedPrimitives
buffering of all frames
ScopedVclPtrInstance< VirtualDevice > maVirtualDevice
the on-demand created VirtualDevices for frame creation
basegfx::B2DHomMatrix maTransform
the geometric definition
ScopedVclPtrInstance< VirtualDevice > maVirtualDeviceMask
const Graphic maGraphic
the Graphic with all its content possibilities, here only animated is allowed and gets checked by isV...
bool mbBufferingAllowed
Primitive2DReference maBufferedFirstFrame
buffering of 1st frame (always active)
bool mbHugeSize
set if the animation is huge so that just always the next frame is used instead of using timing
::Animation maAnimation
local animation processing data, excerpt from maGraphic
sal_Int32 nIndex
uno_Any a
VCL_DLLPUBLIC bool isVCLSkiaEnabled()
bool more(const T &rfValA, const T &rfValB)
bool equalZero(const T &rfVal)
bool equal(T const &rfValA, T const &rfValB)
B2DHomMatrix createTranslateB2DHomMatrix(double fTranslateX, double fTranslateY)
B2DPolygon const & createUnitPolygon()
B2IRange fround(const B2DRange &rRange)
rtl::Reference< BasePrimitive2D > Primitive2DReference
Definition: CommonTypes.hxx:27
void create2DDecompositionOfGraphic(Primitive2DContainer &rContainer, const Graphic &rGraphic, const basegfx::B2DHomMatrix &rTransform)
Helper method with supports decomposing a Graphic with all possible contents to lower level primitive...
Primitive2DContainer create2DColorModifierEmbeddingsAsNeeded(Primitive2DContainer &&rChildren, GraphicDrawMode aGraphicDrawMode, double fLuminance, double fContrast, double fRed, double fGreen, double fBlue, double fGamma, bool bInvert)
Helper to embed given sequence of primitives to evtl.
tools::Long mnWait
Point maPositionPixel
BitmapEx maBitmapEx
Disposal meDisposal
#define SAL_MAX_UINT32
bool operator==(const XclFontData &rLeft, const XclFontData &rRight)