JUCE  v5.1.1-3-g1a0b28c73
JUCE API
CoreGraphicsContext Class Reference

#include <juce_mac_CoreGraphicsContext.h>

Inheritance diagram for CoreGraphicsContext:
Collaboration diagram for CoreGraphicsContext:

Classes

struct  SavedState
 

Public Member Functions

 CoreGraphicsContext (CGContextRef context, float flipHeight, float targetScale)
 
 ~CoreGraphicsContext ()
 
void addTransform (const AffineTransform &) override
 
void beginTransparencyLayer (float opacity) override
 
bool clipRegionIntersects (const Rectangle< int > &) override
 
void clipToImageAlpha (const Image &, const AffineTransform &) override
 
void clipToPath (const Path &, const AffineTransform &) override
 
bool clipToRectangle (const Rectangle< int > &) override
 
bool clipToRectangleList (const RectangleList< int > &) override
 
void drawGlyph (int glyphNumber, const AffineTransform &) override
 
void drawImage (const Image &sourceImage, const AffineTransform &) override
 
void drawLine (const Line< float > &) override
 
bool drawTextLayout (const AttributedString &, const Rectangle< float > &) override
 
void endTransparencyLayer () override
 
void excludeClipRectangle (const Rectangle< int > &) override
 
void fillPath (const Path &, const AffineTransform &) override
 
void fillRect (const Rectangle< int > &, bool replaceExistingContents) override
 
void fillRect (const Rectangle< float > &) override
 
void fillRectList (const RectangleList< float > &) override
 
Rectangle< intgetClipBounds () const override
 
const FontgetFont () override
 
float getPhysicalPixelScaleFactor () override
 
bool isClipEmpty () const override
 
bool isVectorDevice () const override
 Returns true if this device is vector-based, e.g. More...
 
void restoreState () override
 
void saveState () override
 
void setFill (const FillType &) override
 
void setFont (const Font &) override
 
void setInterpolationQuality (Graphics::ResamplingQuality) override
 
void setOpacity (float) override
 
void setOrigin (Point< int >) override
 Moves the origin to a new position. More...
 

Private Member Functions

void applyTransform (const AffineTransform &) const
 
bool clipToRectangleListWithoutTest (const RectangleList< int > &)
 
void createPath (const Path &) const
 
void createPath (const Path &, const AffineTransform &) const
 
void drawGradient ()
 
void drawImage (const Image &, const AffineTransform &, bool fillEntireClipAsTiles)
 
void fillCGRect (const CGRect &, bool replaceExistingContents)
 
void flip () const
 

Private Attributes

CGContextRef context
 
const CGFloat flipHeight
 
CGColorSpaceRef greyColourSpace
 
Rectangle< intlastClipRect
 
bool lastClipRectIsValid
 
CGColorSpaceRef rgbColourSpace
 
ScopedPointer< SavedStatestate
 
OwnedArray< SavedStatestateStack
 
float targetScale
 

Constructor & Destructor Documentation

◆ CoreGraphicsContext()

CoreGraphicsContext::CoreGraphicsContext ( CGContextRef  context,
float  flipHeight,
float  targetScale 
)

◆ ~CoreGraphicsContext()

CoreGraphicsContext::~CoreGraphicsContext ( )

Member Function Documentation

◆ addTransform()

void CoreGraphicsContext::addTransform ( const AffineTransform )
overridevirtual

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ applyTransform()

void CoreGraphicsContext::applyTransform ( const AffineTransform ) const
private

◆ beginTransparencyLayer()

void CoreGraphicsContext::beginTransparencyLayer ( float  opacity)
overridevirtual

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ clipRegionIntersects()

bool CoreGraphicsContext::clipRegionIntersects ( const Rectangle< int > &  )
overridevirtual

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ clipToImageAlpha()

void CoreGraphicsContext::clipToImageAlpha ( const Image ,
const AffineTransform  
)
overridevirtual

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ clipToPath()

void CoreGraphicsContext::clipToPath ( const Path ,
const AffineTransform  
)
overridevirtual

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ clipToRectangle()

bool CoreGraphicsContext::clipToRectangle ( const Rectangle< int > &  )
overridevirtual

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ clipToRectangleList()

bool CoreGraphicsContext::clipToRectangleList ( const RectangleList< int > &  )
overridevirtual

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ clipToRectangleListWithoutTest()

bool CoreGraphicsContext::clipToRectangleListWithoutTest ( const RectangleList< int > &  )
private

◆ createPath() [1/2]

void CoreGraphicsContext::createPath ( const Path ) const
private

◆ createPath() [2/2]

void CoreGraphicsContext::createPath ( const Path ,
const AffineTransform  
) const
private

◆ drawGlyph()

void CoreGraphicsContext::drawGlyph ( int  glyphNumber,
const AffineTransform  
)
overridevirtual

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ drawGradient()

void CoreGraphicsContext::drawGradient ( )
private

◆ drawImage() [1/2]

void CoreGraphicsContext::drawImage ( const Image sourceImage,
const AffineTransform  
)
overridevirtual

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ drawImage() [2/2]

void CoreGraphicsContext::drawImage ( const Image ,
const AffineTransform ,
bool  fillEntireClipAsTiles 
)
private

◆ drawLine()

void CoreGraphicsContext::drawLine ( const Line< float > &  )
overridevirtual

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ drawTextLayout()

bool CoreGraphicsContext::drawTextLayout ( const AttributedString ,
const Rectangle< float > &   
)
overridevirtual

Reimplemented from LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ endTransparencyLayer()

void CoreGraphicsContext::endTransparencyLayer ( )
overridevirtual

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ excludeClipRectangle()

void CoreGraphicsContext::excludeClipRectangle ( const Rectangle< int > &  )
overridevirtual

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ fillCGRect()

void CoreGraphicsContext::fillCGRect ( const CGRect &  ,
bool  replaceExistingContents 
)
private

◆ fillPath()

void CoreGraphicsContext::fillPath ( const Path ,
const AffineTransform  
)
overridevirtual

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ fillRect() [1/2]

void CoreGraphicsContext::fillRect ( const Rectangle< int > &  ,
bool  replaceExistingContents 
)
overridevirtual

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ fillRect() [2/2]

void CoreGraphicsContext::fillRect ( const Rectangle< float > &  )
overridevirtual

◆ fillRectList()

void CoreGraphicsContext::fillRectList ( const RectangleList< float > &  )
overridevirtual

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ flip()

void CoreGraphicsContext::flip ( ) const
private

◆ getClipBounds()

Rectangle<int> CoreGraphicsContext::getClipBounds ( ) const
overridevirtual

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ getFont()

const Font& CoreGraphicsContext::getFont ( )
overridevirtual

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ getPhysicalPixelScaleFactor()

float CoreGraphicsContext::getPhysicalPixelScaleFactor ( )
overridevirtual

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ isClipEmpty()

bool CoreGraphicsContext::isClipEmpty ( ) const
overridevirtual

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ isVectorDevice()

◆ restoreState()

void CoreGraphicsContext::restoreState ( )
overridevirtual

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ saveState()

void CoreGraphicsContext::saveState ( )
overridevirtual

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ setFill()

void CoreGraphicsContext::setFill ( const FillType )
overridevirtual

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ setFont()

void CoreGraphicsContext::setFont ( const Font )
overridevirtual

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ setInterpolationQuality()

void CoreGraphicsContext::setInterpolationQuality ( Graphics::ResamplingQuality  )
overridevirtual

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ setOpacity()

void CoreGraphicsContext::setOpacity ( float  )
overridevirtual

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ setOrigin()

void CoreGraphicsContext::setOrigin ( Point< int )
overridevirtual

Moves the origin to a new position.

The coordinates are relative to the current origin, and indicate the new position of (0, 0).

Implements LowLevelGraphicsContext.

Referenced by isVectorDevice().

Member Data Documentation

◆ context

CGContextRef CoreGraphicsContext::context
private

◆ flipHeight

const CGFloat CoreGraphicsContext::flipHeight
private

◆ greyColourSpace

CGColorSpaceRef CoreGraphicsContext::greyColourSpace
private

◆ lastClipRect

Rectangle<int> CoreGraphicsContext::lastClipRect
mutableprivate

◆ lastClipRectIsValid

bool CoreGraphicsContext::lastClipRectIsValid
mutableprivate

◆ rgbColourSpace

CGColorSpaceRef CoreGraphicsContext::rgbColourSpace
private

◆ state

ScopedPointer<SavedState> CoreGraphicsContext::state
private

◆ stateStack

OwnedArray<SavedState> CoreGraphicsContext::stateStack
private

◆ targetScale

float CoreGraphicsContext::targetScale
private

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