LibreOffice Module vcl (master)  1
Public Member Functions | Static Public Member Functions | Private Attributes | Friends | List of all members
Graphic Class Reference

#include <graph.hxx>

Public Member Functions

SAL_DLLPRIVATE void ImplTestRefCount ()
 
SAL_DLLPRIVATE ImpGraphicImplGetImpGraphic () const
 
 Graphic ()
 
 Graphic (const GraphicExternalLink &rGraphicLink)
 
 Graphic (const Graphic &rGraphic)
 
 Graphic (Graphic &&rGraphic) noexcept
 
 Graphic (const Bitmap &rBmp)
 
 Graphic (const Image &rImage)
 
 Graphic (const BitmapEx &rBmpEx)
 
 Graphic (const VectorGraphicDataPtr &rVectorGraphicDataPtr)
 
 Graphic (const Animation &rAnimation)
 
 Graphic (const GDIMetaFile &rMtf)
 
 Graphic (const css::uno::Reference< css::graphic::XGraphic > &rxGraphic)
 
Graphicoperator= (const Graphic &rGraphic)
 
Graphicoperator= (Graphic &&rGraphic) noexcept
 
bool operator== (const Graphic &rGraphic) const
 
bool operator!= (const Graphic &rGraphic) const
 
bool IsNone () const
 
void Clear ()
 
GraphicType GetType () const
 
void SetDefaultType ()
 
bool IsSupportedGraphic () const
 
bool IsTransparent () const
 
bool IsAlpha () const
 
bool IsAnimated () const
 
bool IsEPS () const
 
bool isAvailable () const
 
bool makeAvailable ()
 
BitmapEx GetBitmapEx (const GraphicConversionParameters &rParameters=GraphicConversionParameters()) const
 
const BitmapExGetBitmapExRef () const
 Gives direct access to the contained BitmapEx. More...
 
Animation GetAnimation () const
 
const GDIMetaFileGetGDIMetaFile () const
 
css::uno::Reference< css::graphic::XGraphic > GetXGraphic () const
 
Size GetPrefSize () const
 
void SetPrefSize (const Size &rPrefSize)
 
MapMode GetPrefMapMode () const
 
void SetPrefMapMode (const MapMode &rPrefMapMode)
 
basegfx::B2DSize GetPPI () const
 
Size GetSizePixel (const OutputDevice *pRefDevice=nullptr) const
 
sal_uLong GetSizeBytes () const
 
void Draw (OutputDevice *pOutDev, const Point &rDestPt) const
 
void Draw (OutputDevice *pOutDev, const Point &rDestPt, const Size &rDestSize) const
 
void StartAnimation (OutputDevice *pOutDev, const Point &rDestPt, const Size &rDestSize, long nExtraData=0, OutputDevice *pFirstFrameOutDev=nullptr)
 
void StopAnimation (OutputDevice *pOutputDevice, long nExtraData)
 
void SetAnimationNotifyHdl (const Link< Animation *, void > &rLink)
 
Link< Animation *, voidGetAnimationNotifyHdl () const
 
sal_uInt32 GetAnimationLoopCount () const
 
BitmapChecksum GetChecksum () const
 
OUString getOriginURL () const
 
void setOriginURL (OUString const &rOriginURL)
 
OString getUniqueID () const
 
std::shared_ptr< GraphicReader > & GetContext ()
 
void SetContext (const std::shared_ptr< GraphicReader > &pReader)
 
void SetDummyContext (bool value)
 
bool IsDummyContext () const
 
void SetGfxLink (const std::shared_ptr< GfxLink > &rGfxLink)
 
std::shared_ptr< GfxLinkGetSharedGfxLink () const
 
GfxLink GetGfxLink () const
 
bool IsGfxLink () const
 
bool ExportNative (SvStream &rOStream) const
 
const VectorGraphicDataPtrgetVectorGraphicData () const
 
void setPdfData (const std::shared_ptr< std::vector< sal_Int8 >> &rPdfData)
 
const std::shared_ptr< std::vector< sal_Int8 > > & getPdfData () const
 
bool hasPdfData () const
 
void setPageNumber (sal_Int32 nPageNumber)
 Set the page number of the multi-page source this Graphic is rendered from. More...
 
sal_Int32 getPageNumber () const
 Get the page number of the multi-page source this Graphic is rendered from. More...
 

Static Public Member Functions

static void DrawEx (OutputDevice *pOutDev, const OUString &rText, vcl::Font &rFont, const BitmapEx &rBitmap, const Point &rDestPt, const Size &rDestSize)
 
static css::uno::Sequence< sal_Int8getUnoTunnelId ()
 

Private Attributes

std::shared_ptr< ImpGraphicmxImpGraphic
 

Friends

class GraphicObject
 
VCL_DLLPUBLIC void WriteGraphic (SvStream &rOStream, const Graphic &rGraphic)
 
VCL_DLLPUBLIC void ReadGraphic (SvStream &rIStream, Graphic &rGraphic)
 

Detailed Description

Definition at line 105 of file graph.hxx.

Constructor & Destructor Documentation

Graphic::Graphic ( )

Definition at line 181 of file graph.cxx.

References get().

Graphic::Graphic ( const GraphicExternalLink rGraphicLink)
Graphic::Graphic ( const Graphic rGraphic)
Graphic::Graphic ( Graphic &&  rGraphic)
noexcept

Definition at line 194 of file graph.cxx.

Graphic::Graphic ( const Bitmap rBmp)

Definition at line 204 of file graph.cxx.

References get().

Graphic::Graphic ( const Image rImage)

Definition at line 216 of file graph.cxx.

References Image::GetStock(), and mxImpGraphic.

Graphic::Graphic ( const BitmapEx rBmpEx)

Definition at line 209 of file graph.cxx.

References get().

Graphic::Graphic ( const VectorGraphicDataPtr rVectorGraphicDataPtr)

Definition at line 225 of file graph.cxx.

References get().

Graphic::Graphic ( const Animation rAnimation)

Definition at line 230 of file graph.cxx.

References get().

Graphic::Graphic ( const GDIMetaFile rMtf)

Definition at line 235 of file graph.cxx.

References get().

Graphic::Graphic ( const css::uno::Reference< css::graphic::XGraphic > &  rxGraphic)

Member Function Documentation

void Graphic::Clear ( )

Definition at line 307 of file graph.cxx.

References ImplTestRefCount(), and mxImpGraphic.

Referenced by GraphicFilter::ImportGraphic(), and vcl::PageSyncData::PlaySyncPageAct().

void Graphic::Draw ( OutputDevice pOutDev,
const Point rDestPt 
) const

Definition at line 446 of file graph.cxx.

References mxImpGraphic.

Referenced by OutputDevice::DrawEPS(), and GraphicFilter::ExportGraphic().

void Graphic::Draw ( OutputDevice pOutDev,
const Point rDestPt,
const Size rDestSize 
) const

Definition at line 451 of file graph.cxx.

References Default, and mxImpGraphic.

void Graphic::DrawEx ( OutputDevice pOutDev,
const OUString &  rText,
vcl::Font rFont,
const BitmapEx rBitmap,
const Point rDestPt,
const Size rDestSize 
)
static

Definition at line 460 of file graph.cxx.

bool Graphic::ExportNative ( SvStream rOStream) const

Definition at line 542 of file graph.cxx.

References mxImpGraphic.

Animation Graphic::GetAnimation ( ) const

Definition at line 354 of file graph.cxx.

References mxImpGraphic.

Referenced by GraphicObject::GetTransformedGraphic().

sal_uInt32 Graphic::GetAnimationLoopCount ( ) const

Definition at line 491 of file graph.cxx.

References mxImpGraphic.

Referenced by GraphicObject::GetTransformedGraphic().

Link< Animation *, void > Graphic::GetAnimationNotifyHdl ( ) const

Definition at line 486 of file graph.cxx.

References mxImpGraphic.

BitmapEx Graphic::GetBitmapEx ( const GraphicConversionParameters rParameters = GraphicConversionParameters()) const
const BitmapEx & Graphic::GetBitmapExRef ( ) const

Gives direct access to the contained BitmapEx.

Definition at line 364 of file graph.cxx.

References mxImpGraphic.

Referenced by GraphicFilter::ImportGraphic().

BitmapChecksum Graphic::GetChecksum ( ) const

Definition at line 537 of file graph.cxx.

References mxImpGraphic.

Referenced by std::hash< Graphic >::operator()().

std::shared_ptr< GraphicReader > & Graphic::GetContext ( )

Definition at line 496 of file graph.cxx.

References mxImpGraphic.

Referenced by ImportGIF(), GraphicFilter::ImportGraphic(), ImportJPEG(), ImportXBM(), and ImportXPM().

const GDIMetaFile & Graphic::GetGDIMetaFile ( ) const
GfxLink Graphic::GetGfxLink ( ) const
OUString Graphic::getOriginURL ( ) const

Definition at line 590 of file graph.cxx.

References mxImpGraphic.

sal_Int32 Graphic::getPageNumber ( ) const

Get the page number of the multi-page source this Graphic is rendered from.

Definition at line 585 of file graph.cxx.

References mxImpGraphic.

const std::shared_ptr< std::vector< sal_Int8 > > & Graphic::getPdfData ( ) const

Definition at line 569 of file graph.cxx.

References mxImpGraphic.

Referenced by vcl::PDFWriterImpl::createEmbeddedFile(), and hasPdfData().

basegfx::B2DSize Graphic::GetPPI ( ) const
MapMode Graphic::GetPrefMapMode ( ) const
Size Graphic::GetPrefSize ( ) const
std::shared_ptr< GfxLink > Graphic::GetSharedGfxLink ( ) const

Definition at line 522 of file graph.cxx.

References mxImpGraphic.

sal_uLong Graphic::GetSizeBytes ( ) const

Definition at line 441 of file graph.cxx.

References mxImpGraphic.

Size Graphic::GetSizePixel ( const OutputDevice pRefDevice = nullptr) const
GraphicType Graphic::GetType ( ) const
OString Graphic::getUniqueID ( ) const

Definition at line 607 of file graph.cxx.

References mxImpGraphic.

Referenced by GraphicObject::GetUniqueID().

css::uno::Sequence< sal_Int8 > Graphic::getUnoTunnelId ( )
static

Definition at line 621 of file graph.cxx.

const VectorGraphicDataPtr & Graphic::getVectorGraphicData ( ) const

Definition at line 558 of file graph.cxx.

References mxImpGraphic.

Referenced by GraphicFilter::ExportGraphic().

uno::Reference< graphic::XGraphic > Graphic::GetXGraphic ( ) const

Definition at line 369 of file graph.cxx.

References GetType(), unographic::Graphic::init(), NONE, and xGraphic.

Referenced by vcl::graphic::SearchForGraphics().

bool Graphic::hasPdfData ( ) const
SAL_DLLPRIVATE ImpGraphic* Graphic::ImplGetImpGraphic ( ) const
inline
void Graphic::ImplTestRefCount ( )
bool Graphic::IsAlpha ( ) const

Definition at line 334 of file graph.cxx.

References mxImpGraphic.

Referenced by GraphicObject::ImplDrawTiled().

bool Graphic::IsAnimated ( ) const
bool Graphic::isAvailable ( ) const

Definition at line 263 of file graph.cxx.

References mxImpGraphic.

bool Graphic::IsDummyContext ( ) const

Definition at line 511 of file graph.cxx.

References mxImpGraphic.

Referenced by GraphicFilter::ImportGraphic().

bool Graphic::IsEPS ( ) const

Definition at line 344 of file graph.cxx.

References mxImpGraphic.

Referenced by GraphicObject::IsEPS().

bool Graphic::IsGfxLink ( ) const
bool Graphic::IsNone ( ) const

Definition at line 302 of file graph.cxx.

References mxImpGraphic, and NONE.

Referenced by vcl::graphic::SearchForGraphics().

bool Graphic::IsSupportedGraphic ( ) const

Definition at line 324 of file graph.cxx.

References mxImpGraphic.

Referenced by GraphicObject::GetTransformedGraphic().

bool Graphic::IsTransparent ( ) const

Definition at line 329 of file graph.cxx.

References mxImpGraphic.

Referenced by GraphicObject::IsTransparent().

bool Graphic::makeAvailable ( )

Definition at line 268 of file graph.cxx.

References mxImpGraphic.

bool Graphic::operator!= ( const Graphic rGraphic) const

Definition at line 297 of file graph.cxx.

References mxImpGraphic.

Graphic & Graphic::operator= ( const Graphic rGraphic)
Graphic & Graphic::operator= ( Graphic &&  rGraphic)
noexcept

Definition at line 286 of file graph.cxx.

References mxImpGraphic.

bool Graphic::operator== ( const Graphic rGraphic) const

Definition at line 292 of file graph.cxx.

References mxImpGraphic.

void Graphic::SetAnimationNotifyHdl ( const Link< Animation *, void > &  rLink)

Definition at line 481 of file graph.cxx.

References mxImpGraphic.

void Graphic::SetContext ( const std::shared_ptr< GraphicReader > &  pReader)

Definition at line 501 of file graph.cxx.

References mxImpGraphic.

Referenced by ImportGIF(), ImportJPEG(), ImportXBM(), and ImportXPM().

void Graphic::SetDefaultType ( )

Definition at line 318 of file graph.cxx.

References ImplTestRefCount(), and mxImpGraphic.

Referenced by GraphicFilter::ImportGraphic().

void Graphic::SetDummyContext ( bool  value)

Definition at line 506 of file graph.cxx.

References mxImpGraphic.

Referenced by GraphicFilter::ImportGraphic().

void Graphic::SetGfxLink ( const std::shared_ptr< GfxLink > &  rGfxLink)
void Graphic::setOriginURL ( OUString const &  rOriginURL)

Definition at line 599 of file graph.cxx.

References mxImpGraphic.

void Graphic::setPageNumber ( sal_Int32  nPageNumber)

Set the page number of the multi-page source this Graphic is rendered from.

Definition at line 580 of file graph.cxx.

References mxImpGraphic.

Referenced by vcl::ImportPDF(), and vcl::ImportPDFUnloaded().

void Graphic::setPdfData ( const std::shared_ptr< std::vector< sal_Int8 >> &  rPdfData)

Definition at line 563 of file graph.cxx.

References ImplTestRefCount(), and mxImpGraphic.

Referenced by vcl::ImportPDF(), and vcl::ImportPDFUnloaded().

void Graphic::SetPrefMapMode ( const MapMode rPrefMapMode)

Definition at line 399 of file graph.cxx.

References ImplTestRefCount(), and mxImpGraphic.

Referenced by GraphicObject::GetTransformedGraphic(), and ImpGetScaledGraphic().

void Graphic::SetPrefSize ( const Size rPrefSize)

Definition at line 388 of file graph.cxx.

References ImplTestRefCount(), and mxImpGraphic.

Referenced by GraphicObject::GetTransformedGraphic(), and ImpGetScaledGraphic().

void Graphic::StartAnimation ( OutputDevice pOutDev,
const Point rDestPt,
const Size rDestSize,
long  nExtraData = 0,
OutputDevice pFirstFrameOutDev = nullptr 
)

Definition at line 467 of file graph.cxx.

References ImplTestRefCount(), and mxImpGraphic.

void Graphic::StopAnimation ( OutputDevice pOutputDevice,
long  nExtraData 
)

Definition at line 475 of file graph.cxx.

References ImplTestRefCount(), and mxImpGraphic.

Friends And Related Function Documentation

friend class GraphicObject
friend

Definition at line 212 of file graph.hxx.

VCL_DLLPUBLIC void ReadGraphic ( SvStream rIStream,
Graphic rGraphic 
)
friend

Definition at line 547 of file graph.cxx.

VCL_DLLPUBLIC void WriteGraphic ( SvStream rOStream,
const Graphic rGraphic 
)
friend

Definition at line 553 of file graph.cxx.

Member Data Documentation

std::shared_ptr<ImpGraphic> Graphic::mxImpGraphic
private

The documentation for this class was generated from the following files: