LibreOffice Module svx (master)  1
overlaytools.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 
32 #include <vcl/svapp.hxx>
33 #include <vcl/settings.hxx>
34 
35 
36 namespace drawinglayer
37 {
38 namespace primitive2d
39 {
40 
42  const basegfx::B2DPoint& rPosition,
43  const basegfx::B2DSize& rSize,
44  const basegfx::BColor& rStrokeColor,
45  const basegfx::BColor& rFillColor,
46  double fTransparence,
47  double fRotation)
49  , maPosition(rPosition)
50  , maSize(rSize)
51  , maStrokeColor(rStrokeColor)
52  , maFillColor(rFillColor)
53  , mfTransparence(fTransparence)
54  , mfRotation(fRotation)
55 {}
56 
58 {
59  Primitive2DContainer aPrimitive2DSequence;
60  const double fHalfWidth = maSize.getX() * getDiscreteUnit() / 2.0;
61  const double fHalfHeight = maSize.getY() * getDiscreteUnit() / 2.0;
62 
63  basegfx::B2DRange aRange(
64  maPosition.getX() - fHalfWidth, maPosition.getY() - fHalfHeight,
65  maPosition.getX() + fHalfWidth, maPosition.getY() + fHalfHeight);
66 
68  {
69  basegfx::B2DPolygon aPolygon(
71 
72  // create filled primitive
73  basegfx::B2DPolyPolygon aPolyPolygon;
74  aPolyPolygon.append(aPolygon);
75 
76  const attribute::LineAttribute aLineAttribute(maStrokeColor, 1.0);
77 
78  // create data
79  const Primitive2DReference aStroke(
80  new PolyPolygonStrokePrimitive2D(aPolyPolygon, aLineAttribute));
81 
82  // create fill primitive
83  const Primitive2DReference aFill(
84  new PolyPolygonColorPrimitive2D(aPolyPolygon, maFillColor));
85 
86  aPrimitive2DSequence = Primitive2DContainer(2);
87  aPrimitive2DSequence[0] = aFill;
88  aPrimitive2DSequence[1] = aStroke;
89 
90  // embed filled to transparency (if used)
91  if (mfTransparence > 0.0)
92  {
93  const Primitive2DReference aFillTransparent(
95  aPrimitive2DSequence,
97 
98  aPrimitive2DSequence = Primitive2DContainer { aFillTransparent };
99  }
100  }
101 
102  rContainer.insert(rContainer.end(), aPrimitive2DSequence.begin(), aPrimitive2DSequence.end());
103 }
104 
106 {
107  if (DiscreteMetricDependentPrimitive2D::operator==(rPrimitive))
108  {
109  const OverlayStaticRectanglePrimitive& rCompare = static_cast<const OverlayStaticRectanglePrimitive&>(rPrimitive);
110 
111  return (maPosition == rCompare.maPosition
112  && maSize == rCompare.maSize
113  && maStrokeColor == rCompare.maStrokeColor
114  && maFillColor == rCompare.maFillColor
115  && mfTransparence == rCompare.mfTransparence
116  && mfRotation == rCompare.mfRotation);
117  }
118 
119  return false;
120 }
121 
123 
124 }} // end of namespace drawinglayer::primitive2d
125 
126 namespace drawinglayer
127 {
128  namespace primitive2d
129  {
131  const BitmapEx& rBitmapEx,
132  const basegfx::B2DPoint& rBasePosition,
133  sal_uInt16 nCenterX,
134  sal_uInt16 nCenterY,
135  double fShearX,
136  double fRotation)
138  maBitmapEx(rBitmapEx),
139  maBasePosition(rBasePosition),
140  mnCenterX(nCenterX),
141  mnCenterY(nCenterY),
142  mfShearX(fShearX),
143  mfRotation(fRotation)
144  {}
145 
147  {
148  const Size aBitmapSize(getBitmapEx().GetSizePixel());
149 
150  if(!aBitmapSize.Width() || !aBitmapSize.Height() || !basegfx::fTools::more(getDiscreteUnit(), 0.0))
151  return;
152 
153  // calculate back from internal bitmap's extreme coordinates (the edges)
154  // to logical coordinates. Only use a unified scaling value (getDiscreteUnit(),
155  // the prepared one which expresses how many logic units form a discrete unit)
156  // for this step. This primitive is to be displayed always unscaled (in it's pixel size)
157  // and unrotated, more like a marker
158  const double fLeft((0.0 - getCenterX()) * getDiscreteUnit());
159  const double fTop((0.0 - getCenterY()) * getDiscreteUnit());
160  const double fRight((aBitmapSize.getWidth() - getCenterX()) * getDiscreteUnit());
161  const double fBottom((aBitmapSize.getHeight() - getCenterY()) * getDiscreteUnit());
162 
163  // create a BitmapPrimitive2D using those positions
164  basegfx::B2DHomMatrix aTransform;
165 
166  aTransform.set(0, 0, fRight - fLeft);
167  aTransform.set(1, 1, fBottom - fTop);
168  aTransform.set(0, 2, fLeft);
169  aTransform.set(1, 2, fTop);
170 
171  // if shearX is used, apply it, too
173  {
174  aTransform.shearX(getShearX());
175  }
176 
177  // if rotation is used, apply it, too
179  {
180  aTransform.rotate(getRotation());
181  }
182 
183  // add BasePosition
184  aTransform.translate(getBasePosition().getX(), getBasePosition().getY());
185 
186  rContainer.push_back(new BitmapPrimitive2D(getBitmapEx(), aTransform));
187  }
188 
190  {
191  if(DiscreteMetricDependentPrimitive2D::operator==(rPrimitive))
192  {
193  const OverlayBitmapExPrimitive& rCompare = static_cast< const OverlayBitmapExPrimitive& >(rPrimitive);
194 
195  return (getBitmapEx() == rCompare.getBitmapEx()
196  && getBasePosition() == rCompare.getBasePosition()
197  && getCenterX() == rCompare.getCenterX()
198  && getCenterY() == rCompare.getCenterY()
199  && getShearX() == rCompare.getShearX()
200  && getRotation() == rCompare.getRotation());
201  }
202 
203  return false;
204  }
205 
207 
208  } // end of namespace primitive2d
209 } // end of namespace drawinglayer
210 
211 
212 namespace drawinglayer
213 {
214  namespace primitive2d
215  {
217  const basegfx::B2DPoint& rBasePosition,
218  const basegfx::BColor& rRGBColorA,
219  const basegfx::BColor& rRGBColorB,
220  double fDiscreteDashLength)
222  maBasePosition(rBasePosition),
223  maRGBColorA(rRGBColorA),
224  maRGBColorB(rRGBColorB),
225  mfDiscreteDashLength(fDiscreteDashLength)
226  {}
227 
229  {
230  // use the prepared Viewport information accessible using getViewport()
231 
232  if(!getViewport().isEmpty())
233  {
234  basegfx::B2DPolygon aPolygon;
235 
236  aPolygon.append(basegfx::B2DPoint(getViewport().getMinX(), getBasePosition().getY()));
237  aPolygon.append(basegfx::B2DPoint(getViewport().getMaxX(), getBasePosition().getY()));
238 
239  rContainer.push_back(
241  aPolygon,
242  getRGBColorA(),
243  getRGBColorB(),
245 
246  aPolygon.clear();
247  aPolygon.append(basegfx::B2DPoint(getBasePosition().getX(), getViewport().getMinY()));
248  aPolygon.append(basegfx::B2DPoint(getBasePosition().getX(), getViewport().getMaxY()));
249 
250  rContainer.push_back(
252  aPolygon,
253  getRGBColorA(),
254  getRGBColorB(),
256  }
257  }
258 
260  {
261  if(ViewportDependentPrimitive2D::operator==(rPrimitive))
262  {
263  const OverlayCrosshairPrimitive& rCompare = static_cast< const OverlayCrosshairPrimitive& >(rPrimitive);
264 
265  return (getBasePosition() == rCompare.getBasePosition()
266  && getRGBColorA() == rCompare.getRGBColorA()
267  && getRGBColorB() == rCompare.getRGBColorB()
268  && getDiscreteDashLength() == rCompare.getDiscreteDashLength());
269  }
270 
271  return false;
272  }
273 
275 
276  } // end of namespace primitive2d
277 } // end of namespace drawinglayer
278 
279 
280 namespace drawinglayer
281 {
282  namespace primitive2d
283  {
285  const basegfx::B2DRange& rObjectRange,
286  const basegfx::BColor& rColor,
287  double fTransparence,
288  double fDiscreteGrow,
289  double fDiscreteShrink,
290  double fRotation)
292  maObjectRange(rObjectRange),
293  maColor(rColor),
294  mfTransparence(fTransparence),
295  mfDiscreteGrow(fDiscreteGrow),
296  mfDiscreteShrink(fDiscreteShrink),
297  mfRotation(fRotation)
298  {}
299 
301  {
302  Primitive2DContainer aRetval;
303  basegfx::B2DRange aInnerRange(getObjectRange());
304 
305  if(!aInnerRange.isEmpty() && basegfx::fTools::more(getDiscreteUnit(), 0.0) && getTransparence() <= 1.0)
306  {
307  basegfx::B2DRange aOuterRange(getObjectRange());
308 
309  // grow/shrink inner/outer polygons
310  aOuterRange.grow(getDiscreteUnit() * getDiscreteGrow());
311  aInnerRange.grow(getDiscreteUnit() * -getDiscreteShrink());
312 
313  // convert to polygons
314  const double fFullGrow(getDiscreteGrow() + getDiscreteShrink());
315  const double fRelativeRadiusX(fFullGrow / aOuterRange.getWidth());
316  const double fRelativeRadiusY(fFullGrow / aOuterRange.getHeight());
317  basegfx::B2DPolygon aOuterPolygon(
319  aOuterRange,
320  fRelativeRadiusX,
321  fRelativeRadiusY));
322  basegfx::B2DPolygon aInnerPolygon(
324  aInnerRange));
325 
326  // apply evtl. existing rotation
328  {
330  getObjectRange().getMinX(), getObjectRange().getMinY(), getRotation()));
331 
332  aOuterPolygon.transform(aTransform);
333  aInnerPolygon.transform(aTransform);
334  }
335 
336  // create filled primitive
337  basegfx::B2DPolyPolygon aPolyPolygon;
338 
339  aPolyPolygon.append(aOuterPolygon);
340  aPolyPolygon.append(aInnerPolygon);
341 
342  if(Application::GetSettings().GetStyleSettings().GetHighContrastMode())
343  {
344  // for high contrast, use hatch
345  const basegfx::BColor aHighContrastLineColor(Application::GetSettings().GetStyleSettings().GetFontColor().getBColor());
346  const basegfx::BColor aEmptyColor(0.0, 0.0, 0.0);
347  const double fHatchRotation(basegfx::deg2rad(45));
348  const double fDiscreteHatchDistance(3.0);
349  const drawinglayer::attribute::FillHatchAttribute aFillHatchAttribute(
351  fDiscreteHatchDistance * getDiscreteUnit(),
352  fHatchRotation - getRotation(),
353  aHighContrastLineColor,
354  3, // same default as VCL, a minimum of three discrete units (pixels) offset
355  false);
356  const Primitive2DReference aHatch(
358  aPolyPolygon,
359  aEmptyColor,
360  aFillHatchAttribute));
361 
362  aRetval = Primitive2DContainer { aHatch };
363  }
364  else
365  {
366  // create fill primitive
367  const Primitive2DReference aFill(
369  aPolyPolygon,
370  getColor()));
371 
372  aRetval = Primitive2DContainer { aFill };
373 
374  // embed filled to transparency (if used)
375  if(getTransparence() > 0.0)
376  {
377  const Primitive2DReference aFillTransparent(
379  aRetval,
380  getTransparence()));
381 
382  aRetval = Primitive2DContainer { aFillTransparent };
383  }
384  }
385  }
386 
387  rContainer.insert(rContainer.end(), aRetval.begin(), aRetval.end());
388  }
389 
391  {
392  if(DiscreteMetricDependentPrimitive2D::operator==(rPrimitive))
393  {
394  const OverlayRectanglePrimitive& rCompare = static_cast< const OverlayRectanglePrimitive& >(rPrimitive);
395 
396  return (getObjectRange() == rCompare.getObjectRange()
397  && getColor() == rCompare.getColor()
398  && getTransparence() == rCompare.getTransparence()
399  && getDiscreteGrow() == rCompare.getDiscreteGrow()
400  && getDiscreteShrink() == rCompare.getDiscreteShrink()
401  && getRotation() == rCompare.getRotation());
402  }
403 
404  return false;
405  }
406 
408 
409  } // end of namespace primitive2d
410 } // end of namespace drawinglayer
411 
412 
413 namespace drawinglayer
414 {
415  namespace primitive2d
416  {
418  const basegfx::B2DPoint& rBasePosition,
419  HelplineStyle eStyle,
420  const basegfx::BColor& rRGBColorA,
421  const basegfx::BColor& rRGBColorB,
422  double fDiscreteDashLength)
424  maBasePosition(rBasePosition),
425  meStyle(eStyle),
426  maRGBColorA(rRGBColorA),
427  maRGBColorB(rRGBColorB),
428  mfDiscreteDashLength(fDiscreteDashLength)
429  {}
430 
432  {
433  // use the prepared Viewport information accessible using getViewport()
434 
435  if(!getViewport().isEmpty())
436  {
437  switch(getStyle())
438  {
440  {
441  basegfx::B2DPolygon aLine;
442 
443  aLine.append(basegfx::B2DPoint(getBasePosition().getX(), getViewport().getMinY()));
444  aLine.append(basegfx::B2DPoint(getBasePosition().getX(), getViewport().getMaxY()));
445 
446  rContainer.push_back(
448  aLine,
449  getRGBColorA(),
450  getRGBColorB(),
452  break;
453  }
454 
456  {
457  basegfx::B2DPolygon aLine;
458 
459  aLine.append(basegfx::B2DPoint(getViewport().getMinX(), getBasePosition().getY()));
460  aLine.append(basegfx::B2DPoint(getViewport().getMaxX(), getBasePosition().getY()));
461 
462  rContainer.push_back(
464  aLine,
465  getRGBColorA(),
466  getRGBColorB(),
468  break;
469  }
470 
471  default: // case HELPLINESTYLE_POINT :
472  {
473  const double fDiscreteUnit((rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 0.0)).getLength());
474  basegfx::B2DPolygon aLineA, aLineB;
475 
476  aLineA.append(basegfx::B2DPoint(getBasePosition().getX(), getBasePosition().getY() - fDiscreteUnit));
477  aLineA.append(basegfx::B2DPoint(getBasePosition().getX(), getBasePosition().getY() + fDiscreteUnit));
478 
479  rContainer.push_back(
481  aLineA,
482  getRGBColorA(),
483  getRGBColorB(),
485 
486  aLineB.append(basegfx::B2DPoint(getBasePosition().getX() - fDiscreteUnit, getBasePosition().getY()));
487  aLineB.append(basegfx::B2DPoint(getBasePosition().getX() + fDiscreteUnit, getBasePosition().getY()));
488 
489  rContainer.push_back(
491  aLineB,
492  getRGBColorA(),
493  getRGBColorB(),
495 
496  break;
497  }
498  }
499  }
500  }
501 
503  {
504  if(ViewportDependentPrimitive2D::operator==(rPrimitive))
505  {
506  const OverlayHelplineStripedPrimitive& rCompare = static_cast< const OverlayHelplineStripedPrimitive& >(rPrimitive);
507 
508  return (getBasePosition() == rCompare.getBasePosition()
509  && getStyle() == rCompare.getStyle()
510  && getRGBColorA() == rCompare.getRGBColorA()
511  && getRGBColorB() == rCompare.getRGBColorB()
512  && getDiscreteDashLength() == rCompare.getDiscreteDashLength());
513  }
514 
515  return false;
516  }
517 
519 
520  } // end of namespace primitive2d
521 } // end of namespace drawinglayer
522 
523 
524 namespace drawinglayer
525 {
526  namespace primitive2d
527  {
529  const basegfx::B2DRange& aRollingRectangle,
530  const basegfx::BColor& rRGBColorA,
531  const basegfx::BColor& rRGBColorB,
532  double fDiscreteDashLength)
534  maRollingRectangle(aRollingRectangle),
535  maRGBColorA(rRGBColorA),
536  maRGBColorB(rRGBColorB),
537  mfDiscreteDashLength(fDiscreteDashLength)
538  {}
539 
541  {
542  // use the prepared Viewport information accessible using getViewport()
543 
544  if(getViewport().isEmpty())
545  return;
546 
547  basegfx::B2DPolygon aLine;
548 
549  // Left lines
550  aLine.append(basegfx::B2DPoint(getViewport().getMinX(), getRollingRectangle().getMinY()));
551  aLine.append(basegfx::B2DPoint(getRollingRectangle().getMinX(), getRollingRectangle().getMinY()));
552  rContainer.push_back(new PolygonMarkerPrimitive2D(aLine, getRGBColorA(), getRGBColorB(), getDiscreteDashLength()));
553 
554  aLine.clear();
555  aLine.append(basegfx::B2DPoint(getViewport().getMinX(), getRollingRectangle().getMaxY()));
556  aLine.append(basegfx::B2DPoint(getRollingRectangle().getMinX(), getRollingRectangle().getMaxY()));
557  rContainer.push_back(new PolygonMarkerPrimitive2D(aLine, getRGBColorA(), getRGBColorB(), getDiscreteDashLength()));
558 
559  // Right lines
560  aLine.clear();
561  aLine.append(basegfx::B2DPoint(getRollingRectangle().getMaxX(), getRollingRectangle().getMinY()));
562  aLine.append(basegfx::B2DPoint(getViewport().getMaxX(), getRollingRectangle().getMinY()));
563  rContainer.push_back(new PolygonMarkerPrimitive2D(aLine, getRGBColorA(), getRGBColorB(), getDiscreteDashLength()));
564 
565  aLine.clear();
566  aLine.append(basegfx::B2DPoint(getRollingRectangle().getMaxX(), getRollingRectangle().getMaxY()));
567  aLine.append(basegfx::B2DPoint(getViewport().getMaxX(), getRollingRectangle().getMaxY()));
568  rContainer.push_back(new PolygonMarkerPrimitive2D(aLine, getRGBColorA(), getRGBColorB(), getDiscreteDashLength()));
569 
570  // Top lines
571  aLine.clear();
572  aLine.append(basegfx::B2DPoint(getRollingRectangle().getMinX(), getViewport().getMinY()));
573  aLine.append(basegfx::B2DPoint(getRollingRectangle().getMinX(), getRollingRectangle().getMinY()));
574  rContainer.push_back(new PolygonMarkerPrimitive2D(aLine, getRGBColorA(), getRGBColorB(), getDiscreteDashLength()));
575 
576  aLine.clear();
577  aLine.append(basegfx::B2DPoint(getRollingRectangle().getMaxX(), getViewport().getMinY()));
578  aLine.append(basegfx::B2DPoint(getRollingRectangle().getMaxX(), getRollingRectangle().getMinY()));
579  rContainer.push_back(new PolygonMarkerPrimitive2D(aLine, getRGBColorA(), getRGBColorB(), getDiscreteDashLength()));
580 
581  // Bottom lines
582  aLine.clear();
583  aLine.append(basegfx::B2DPoint(getRollingRectangle().getMinX(), getRollingRectangle().getMaxY()));
584  aLine.append(basegfx::B2DPoint(getRollingRectangle().getMinX(), getViewport().getMaxY()));
585  rContainer.push_back(new PolygonMarkerPrimitive2D(aLine, getRGBColorA(), getRGBColorB(), getDiscreteDashLength()));
586 
587  aLine.clear();
588  aLine.append(basegfx::B2DPoint(getRollingRectangle().getMaxX(), getRollingRectangle().getMaxY()));
589  aLine.append(basegfx::B2DPoint(getRollingRectangle().getMaxX(), getViewport().getMaxY()));
590  rContainer.push_back(new PolygonMarkerPrimitive2D(aLine, getRGBColorA(), getRGBColorB(), getDiscreteDashLength()));
591 
592  }
593 
595  {
596  if(ViewportDependentPrimitive2D::operator==(rPrimitive))
597  {
598  const OverlayRollingRectanglePrimitive& rCompare = static_cast< const OverlayRollingRectanglePrimitive& >(rPrimitive);
599 
600  return (getRollingRectangle() == rCompare.getRollingRectangle()
601  && getRGBColorA() == rCompare.getRGBColorA()
602  && getRGBColorB() == rCompare.getRGBColorB()
603  && getDiscreteDashLength() == rCompare.getDiscreteDashLength());
604  }
605 
606  return false;
607  }
608 
610 
611  } // end of namespace primitive2d
612 } // end of namespace drawinglayer
613 
614 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
long Width() const
virtual bool operator==(const BasePrimitive2D &rPrimitive) const override
void append(const basegfx::B2DPoint &rPoint, sal_uInt32 nCount)
ImplPrimitive2DIDBlock(BorderLinePrimitive2D, PRIMITIVE2D_ID_BORDERLINEPRIMITIVE2D) Primitive2DReference tryMergeBorderLinePrimitive2D(const Primitive2DReference &rCandidateA
void set(sal_uInt16 nRow, sal_uInt16 nColumn, double fValue)
double getHeight() const
static bool more(const double &rfValA, const double &rfValB)
long Height() const
const basegfx::B2DRange & getViewport() const
#define PRIMITIVE2D_ID_OVERLAYBITMAPEXPRIMITIVE
static const AllSettings & GetSettings()
virtual void create2DDecomposition(Primitive2DContainer &rContainer, const geometry::ViewInformation2D &rViewInformation) const override
double getX() const
Color GetFontColor()
Definition: svdetc.hxx:67
basegfx::B2DPoint const maBasePosition
double getY() const
geometry::RealPoint2D maPosition
OverlayRollingRectanglePrimitive(const basegfx::B2DRange &aRollingRectangle, const basegfx::BColor &rRGBColorA, const basegfx::BColor &rRGBColorB, double fDiscreteDashLength)
const basegfx::B2DPoint & getBasePosition() const
OverlayBitmapExPrimitive(const BitmapEx &rBitmapEx, const basegfx::B2DPoint &rBasePosition, sal_uInt16 nCenterX, sal_uInt16 nCenterY, double fShearX, double fRotation)
const basegfx::B2DPoint & getBasePosition() const
double getWidth() const
#define PRIMITIVE2D_ID_OVERLAYRECTANGLEPRIMITIVE
virtual void create2DDecomposition(Primitive2DContainer &rContainer, const geometry::ViewInformation2D &rViewInformation) const override
OverlayRectanglePrimitive(const basegfx::B2DRange &rObjectRange, const basegfx::BColor &rColor, double fTransparence, double fDiscreteGrow, double fDiscreteShrink, double fRotation)
void grow(double fValue)
virtual bool operator==(const BasePrimitive2D &rPrimitive) const override
bool isEmpty() const
virtual bool operator==(const BasePrimitive2D &rPrimitive) const override
virtual void create2DDecomposition(Primitive2DContainer &rContainer, const geometry::ViewInformation2D &rViewInformation) const override
#define PRIMITIVE2D_ID_OVERLAYROLLINGRECTANGLEPRIMITIVE
B2DPolygon createPolygonFromRect(const B2DRectangle &rRect, double fRadiusX, double fRadiusY)
const basegfx::B2DRange & getObjectRange() const
static bool equalZero(const double &rfVal)
virtual void append(const Primitive2DReference &) override
constexpr double deg2rad(double v)
virtual void create2DDecomposition(Primitive2DContainer &rContainer, const geometry::ViewInformation2D &rViewInformation) const override
#define PRIMITIVE2D_ID_OVERLAYCROSSHAIRPRIMITIVE
virtual void create2DDecomposition(Primitive2DContainer &rContainer, const geometry::ViewInformation2D &rViewInformation) const override
void transform(const basegfx::B2DHomMatrix &rMatrix)
#define PRIMITIVE2D_ID_OVERLAYHELPLINESTRIPEDPRIMITIVE
uno::Sequence< double > maFillColor
virtual bool operator==(const BasePrimitive2D &rPrimitive) const override
void append(const B2DPolygon &rPolygon, sal_uInt32 nCount=1)
const basegfx::B2DHomMatrix & getInverseObjectToViewTransformation() const
OverlayCrosshairPrimitive(const basegfx::B2DPoint &rBasePosition, const basegfx::BColor &rRGBColorA, const basegfx::BColor &rRGBColorB, double fDiscreteDashLength)
virtual bool operator==(const BasePrimitive2D &rPrimitive) const override
basegfx::BColor const maColor
virtual bool operator==(const BasePrimitive2D &rPrimitive) const override
B2DHomMatrix createRotateAroundPoint(double fPointX, double fPointY, double fRadiant)
css::uno::Reference< css::graphic::XPrimitive2D > Primitive2DReference
double getLength(const B2DPolygon &rCandidate)
long getHeight() const
long getWidth() const
virtual void create2DDecomposition(Primitive2DContainer &rContainer, const geometry::ViewInformation2D &rViewInformation) const override
OverlayHelplineStripedPrimitive(const basegfx::B2DPoint &rBasePosition, HelplineStyle eStyle, const basegfx::BColor &rRGBColorA, const basegfx::BColor &rRGBColorB, double fDiscreteDashLength)
::basegfx::B2IVector maSize
OverlayStaticRectanglePrimitive(const basegfx::B2DPoint &rPosition, const basegfx::B2DSize &rSize, const basegfx::BColor &rStrokeColor, const basegfx::BColor &rFillColor, double fTransparence, double fRotation)