LibreOffice Module drawinglayer (master) 1
|
Classes | |
class | BaseProcessor2D |
BaseProcessor2D class. More... | |
class | CairoPixelProcessor2D |
class | ContourExtractor2D |
ContourExtractor2D class. More... | |
class | D2DPixelProcessor2D |
class | HitTestProcessor2D |
HitTestProcessor2D class. More... | |
class | LineGeometryExtractor2D |
LineGeometryExtractor2D class. More... | |
class | ObjectInfoPrimitiveExtractor2D |
ObjectInfoPrimitiveExtractor2D class. More... | |
struct | TextAsPolygonDataNode |
helper data structure for returning the result More... | |
class | TextAsPolygonExtractor2D |
TextAsPolygonExtractor2D class. More... | |
class | VclMetafileProcessor2D |
VclMetafileProcessor2D class. More... | |
class | VclPixelProcessor2D |
VclPixelProcessor2D class. More... | |
class | VclProcessor2D |
VclProcessor2D class. More... | |
Typedefs | |
typedef ::std::vector< TextAsPolygonDataNode > | TextAsPolygonDataNodeVector |
typedef for a vector of that helper data More... | |
Functions | |
std::unique_ptr< BaseProcessor2D > | createPixelProcessor2DFromOutputDevice (OutputDevice &rTargetOutDev, const drawinglayer::geometry::ViewInformation2D &rViewInformation2D) |
create the best available pixel based BaseProcessor2D (which may be system-dependent) More... | |
std::unique_ptr< BaseProcessor2D > | createProcessor2DFromOutputDevice (OutputDevice &rTargetOutDev, const drawinglayer::geometry::ViewInformation2D &rViewInformation2D) |
create a BaseProcessor2D dependent on some states of the given OutputDevice. More... | |
void | setOffsetXYCreatedBitmap (drawinglayer::primitive2d::FillGraphicPrimitive2D &rFillGraphicPrimitive2D, const BitmapEx &rBitmap) |
void | takeCareOfOffsetXY (const drawinglayer::primitive2d::FillGraphicPrimitive2D &rFillGraphicPrimitive2D, BitmapEx &rTarget, basegfx::B2DRange &rFillUnitRange) |
helper to react/process if OffsetX/OffsetY of the FillGraphicAttribute is used. More... | |
bool | prepareBitmapForDirectRender (const drawinglayer::primitive2d::FillGraphicPrimitive2D &rFillGraphicPrimitive2D, const drawinglayer::geometry::ViewInformation2D &rViewInformation2D, BitmapEx &rTarget, basegfx::B2DRange &rFillUnitRange, double fBigDiscreteArea=300.0 *300.0) |
helper to process FillGraphicPrimitive2D: More... | |
void | calculateDiscreteVisibleRange (basegfx::B2DRange &rDiscreteVisibleRange, const basegfx::B2DRange &rContentRange, const drawinglayer::geometry::ViewInformation2D &rViewInformation2D) |
helper to calculate a discrete visible range based on a given logic range and a current ViewInformation2D. More... | |
typedef ::std::vector< TextAsPolygonDataNode > drawinglayer::processor2d::TextAsPolygonDataNodeVector |
typedef for a vector of that helper data
Definition at line 61 of file textaspolygonextractor2d.hxx.
void drawinglayer::processor2d::calculateDiscreteVisibleRange | ( | basegfx::B2DRange & | rDiscreteVisibleRange, |
const basegfx::B2DRange & | rContentRange, | ||
const drawinglayer::geometry::ViewInformation2D & | rViewInformation2D | ||
) |
helper to calculate a discrete visible range based on a given logic range and a current ViewInformation2D.
This is used for pixel renderers. It is handy to check for visibility of a primitive, but also to continue working with just the visible discrete part.
The result rDiscreteVisibleRange will be reset if rContentRange is empty. Else it will be calculated. If ViewInformation2D does have a valid Viewport (getDiscreteViewport is not empty), it will also be clipped against that to calculate the visible part.
@param rDiscreteVisibleRange The logic range in view-coordinates (will be transformed by getObjectToViewTransformation) @param rContentRange The logic input range in view-coordinates (will be transformed by getObjectToViewTransformation) @param rViewInformation2D The ViewInformation to work with (from the processor)
Definition at line 277 of file SDPRProcessor2dTools.cxx.
References drawinglayer::geometry::ViewInformation2D::getDiscreteViewport(), drawinglayer::geometry::ViewInformation2D::getObjectToViewTransformation(), basegfx::Range2D< typename TYPE, typename TRAITS >::intersect(), basegfx::Range2D< typename TYPE, typename TRAITS >::isEmpty(), basegfx::Range2D< typename TYPE, typename TRAITS >::reset(), and basegfx::B2DRange::transform().
Referenced by drawinglayer::processor2d::D2DPixelProcessor2D::processBitmapPrimitive2D(), drawinglayer::processor2d::D2DPixelProcessor2D::processMaskPrimitive2DPixel(), drawinglayer::processor2d::D2DPixelProcessor2D::processTransparencePrimitive2D(), and drawinglayer::processor2d::D2DPixelProcessor2D::processUnifiedTransparencePrimitive2D().
DRAWINGLAYER_DLLPUBLIC std::unique_ptr< BaseProcessor2D > drawinglayer::processor2d::createPixelProcessor2DFromOutputDevice | ( | OutputDevice & | rTargetOutDev, |
const drawinglayer::geometry::ViewInformation2D & | rViewInformation2D | ||
) |
create the best available pixel based BaseProcessor2D (which may be system-dependent)
rTargetOutDev | The target OutputDevice |
rViewInformation2D | The ViewInformation to use |
Definition at line 36 of file processor2dtools.cxx.
References aData, OutputDevice::GetOutOffXPixel(), OutputDevice::GetOutOffYPixel(), OutputDevice::GetSystemGfxData(), drawinglayer::geometry::ViewInformation2D::getViewTransformation(), drawinglayer::geometry::ViewInformation2D::setViewTransformation(), and basegfx::B2DHomMatrix::translate().
Referenced by drawinglayer::convertToBitmapEx(), and createProcessor2DFromOutputDevice().
DRAWINGLAYER_DLLPUBLIC std::unique_ptr< BaseProcessor2D > drawinglayer::processor2d::createProcessor2DFromOutputDevice | ( | OutputDevice & | rTargetOutDev, |
const drawinglayer::geometry::ViewInformation2D & | rViewInformation2D | ||
) |
create a BaseProcessor2D dependent on some states of the given OutputDevice.
If metafile is recorded, the needed VclMetafileProcessor2D will be created. If a pixel renderer is requested, the best one is incarnated
rTargetOutDev | The target OutputDevice |
rViewInformation2D | The ViewInformation to use |
Definition at line 70 of file processor2dtools.cxx.
References createPixelProcessor2DFromOutputDevice(), OutputDevice::GetConnectMetaFile(), GDIMetaFile::IsPause(), and GDIMetaFile::IsRecord().
bool drawinglayer::processor2d::prepareBitmapForDirectRender | ( | const drawinglayer::primitive2d::FillGraphicPrimitive2D & | rFillGraphicPrimitive2D, |
const drawinglayer::geometry::ViewInformation2D & | rViewInformation2D, | ||
BitmapEx & | rTarget, | ||
basegfx::B2DRange & | rFillUnitRange, | ||
double | fBigDiscreteArea = 300.0 *300.0 |
||
) |
helper to process FillGraphicPrimitive2D:
In places that want to implement direct rendering of this primitive e.g. in SDPRs all impls would need to handle the FillGraphicAttribute settings and the type of Graphic. Unify this by this helper in one place since this may get complicated (many cases to cover). It will create and return a BitmapEx when direct tiled rendering is preferable and suggested. Of course every impl may still do what it wants, this is just to make implementations easier. @param rFillGraphicPrimitive2D The primitive to work on @param rViewInformation2D The ViewInformation to work with (from the processor) @param rTarget The prepared PixelData to use for tiled rendering. If this is empty on return this means to evtl. use the decompose. Please hand in an empty one to make this work. @param rFillUnitRange This is a modifiable copy of FillGraphicAttribute.getGraphicRange(). We need a modifiable one since params since OffsetX/OffsetY in FillGraphicAttribute may require to change/adapt this if used @param fBigDiscreteArea Defines starting with which number of square pixels a target is seen to be painted 'big' @return false: rendering is not needed (invalid, outside, ...), done true: rendering is needed -> if rTarget is filled, use for tiled rendering -> if not, use fallback (primitive decomposition) For the various reasons/things that get checked/tested/done, please see the implementation
Definition at line 140 of file SDPRProcessor2dTools.cxx.
References Graphic::GetBitmapEx(), drawinglayer::geometry::ViewInformation2D::getDiscreteViewport(), drawinglayer::primitive2d::FillGraphicPrimitive2D::getFillGraphic(), drawinglayer::attribute::FillGraphicAttribute::getGraphic(), basegfx::B2DVector::getLength(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMaxX(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMaxY(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMinX(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMinY(), drawinglayer::geometry::ViewInformation2D::getObjectToViewTransformation(), drawinglayer::attribute::FillGraphicAttribute::getTiling(), drawinglayer::primitive2d::FillGraphicPrimitive2D::getTransformation(), Graphic::GetType(), basegfx::B2DRange::getUnitB2DRange(), Graphic::getVectorGraphicData(), Graphic::IsAnimated(), drawinglayer::attribute::FillGraphicAttribute::isDefault(), basegfx::Range2D< typename TYPE, typename TRAITS >::isEmpty(), Graphic::IsNone(), basegfx::Range2D< typename TYPE, typename TRAITS >::overlaps(), rTarget, takeCareOfOffsetXY(), basegfx::B2DRange::transform(), and vcl::PngImageWriter::write().
Referenced by drawinglayer::processor2d::D2DPixelProcessor2D::processFillGraphicPrimitive2D().
void drawinglayer::processor2d::setOffsetXYCreatedBitmap | ( | drawinglayer::primitive2d::FillGraphicPrimitive2D & | rFillGraphicPrimitive2D, |
const BitmapEx & | rBitmap | ||
) |
Definition at line 34 of file SDPRProcessor2dTools.cxx.
References drawinglayer::primitive2d::FillGraphicPrimitive2D::impSetOffsetXYCreatedBitmap().
Referenced by takeCareOfOffsetXY().
void drawinglayer::processor2d::takeCareOfOffsetXY | ( | const drawinglayer::primitive2d::FillGraphicPrimitive2D & | rFillGraphicPrimitive2D, |
BitmapEx & | rTarget, | ||
basegfx::B2DRange & | rFillUnitRange | ||
) |
helper to react/process if OffsetX/OffsetY of the FillGraphicAttribute is used.
This is old but hard to remove stuff that allows hor/ver offset when tiled fill is used. To solve that, create pixel data that doubles resp. in width/height and copies the off-setted version of the bitmap information to the extra space, so rendering does not need to do that. Since this doubles the geometry, an adaption of the used fill range (here rFillUnitRange in unit coordinates) also needs to be adapted, refer to usage.
Definition at line 41 of file SDPRProcessor2dTools.cxx.
References a, BitmapEx::CopyPixel(), basegfx::Range2D< typename TYPE, typename TRAITS >::expand(), basegfx::fround(), drawinglayer::primitive2d::FillGraphicPrimitive2D::getFillGraphic(), basegfx::Range2D< typename TYPE, typename TRAITS >::getHeight(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMaxX(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMaxY(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMinX(), basegfx::Range2D< typename TYPE, typename TRAITS >::getMinY(), drawinglayer::attribute::FillGraphicAttribute::getOffsetX(), drawinglayer::primitive2d::FillGraphicPrimitive2D::getOffsetXYCreatedBitmap(), drawinglayer::attribute::FillGraphicAttribute::getOffsetY(), basegfx::Range2D< typename TYPE, typename TRAITS >::getWidth(), h, Size::Height(), BitmapEx::IsEmpty(), rTarget, setOffsetXYCreatedBitmap(), BitmapEx::SetPrefSize(), w, and Size::Width().
Referenced by prepareBitmapForDirectRender().