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 185 of file graph.cxx.

References get().

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

Definition at line 198 of file graph.cxx.

Graphic::Graphic ( const Bitmap rBmp)

Definition at line 208 of file graph.cxx.

References get().

Graphic::Graphic ( const Image rImage)

Definition at line 220 of file graph.cxx.

References Image::GetStock(), and mxImpGraphic.

Graphic::Graphic ( const BitmapEx rBmpEx)

Definition at line 213 of file graph.cxx.

References get().

Graphic::Graphic ( const VectorGraphicDataPtr rVectorGraphicDataPtr)

Definition at line 229 of file graph.cxx.

References get().

Graphic::Graphic ( const Animation rAnimation)

Definition at line 234 of file graph.cxx.

References get().

Graphic::Graphic ( const GDIMetaFile rMtf)

Definition at line 239 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 311 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 450 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 455 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 464 of file graph.cxx.

bool Graphic::ExportNative ( SvStream rOStream) const

Definition at line 546 of file graph.cxx.

References mxImpGraphic.

Animation Graphic::GetAnimation ( ) const

Definition at line 358 of file graph.cxx.

References mxImpGraphic.

Referenced by GraphicObject::GetTransformedGraphic().

sal_uInt32 Graphic::GetAnimationLoopCount ( ) const

Definition at line 495 of file graph.cxx.

References mxImpGraphic.

Referenced by GraphicObject::GetTransformedGraphic().

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

Definition at line 490 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 368 of file graph.cxx.

References mxImpGraphic.

Referenced by GraphicFilter::ImportGraphic().

BitmapChecksum Graphic::GetChecksum ( ) const

Definition at line 541 of file graph.cxx.

References mxImpGraphic.

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

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

Definition at line 500 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 594 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 589 of file graph.cxx.

References mxImpGraphic.

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

Definition at line 573 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 526 of file graph.cxx.

References mxImpGraphic.

sal_uLong Graphic::GetSizeBytes ( ) const

Definition at line 445 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 611 of file graph.cxx.

References mxImpGraphic.

Referenced by GraphicObject::GetUniqueID().

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

Definition at line 625 of file graph.cxx.

const VectorGraphicDataPtr & Graphic::getVectorGraphicData ( ) const

Definition at line 562 of file graph.cxx.

References mxImpGraphic.

Referenced by GraphicFilter::ExportGraphic().

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

Definition at line 373 of file graph.cxx.

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

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 338 of file graph.cxx.

References mxImpGraphic.

Referenced by GraphicObject::ImplDrawTiled().

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

Definition at line 267 of file graph.cxx.

References mxImpGraphic.

bool Graphic::IsDummyContext ( ) const

Definition at line 515 of file graph.cxx.

References mxImpGraphic.

Referenced by GraphicFilter::ImportGraphic().

bool Graphic::IsEPS ( ) const

Definition at line 348 of file graph.cxx.

References mxImpGraphic.

Referenced by GraphicObject::IsEPS().

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

Definition at line 306 of file graph.cxx.

References mxImpGraphic, and NONE.

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

bool Graphic::IsSupportedGraphic ( ) const

Definition at line 328 of file graph.cxx.

References mxImpGraphic.

Referenced by GraphicObject::GetTransformedGraphic().

bool Graphic::IsTransparent ( ) const

Definition at line 333 of file graph.cxx.

References mxImpGraphic.

Referenced by GraphicObject::IsTransparent().

bool Graphic::makeAvailable ( )

Definition at line 272 of file graph.cxx.

References mxImpGraphic.

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

Definition at line 301 of file graph.cxx.

References mxImpGraphic.

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

Definition at line 290 of file graph.cxx.

References mxImpGraphic.

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

Definition at line 296 of file graph.cxx.

References mxImpGraphic.

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

Definition at line 485 of file graph.cxx.

References mxImpGraphic.

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

Definition at line 505 of file graph.cxx.

References mxImpGraphic.

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

void Graphic::SetDefaultType ( )

Definition at line 322 of file graph.cxx.

References ImplTestRefCount(), and mxImpGraphic.

Referenced by GraphicFilter::ImportGraphic().

void Graphic::SetDummyContext ( bool  value)

Definition at line 510 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 603 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 584 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 567 of file graph.cxx.

References ImplTestRefCount(), and mxImpGraphic.

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

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

Definition at line 471 of file graph.cxx.

References ImplTestRefCount(), and mxImpGraphic.

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

Definition at line 479 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 551 of file graph.cxx.

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

Definition at line 557 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: