JUCE  v5.4.1-191-g0ab5e696f
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::CoreGraphicsContext Class Reference

#include <juce_mac_CoreGraphicsContext.h>

Inheritance diagram for juce::CoreGraphicsContext:
Collaboration diagram for juce::CoreGraphicsContext:

Classes

struct  SavedState
 

Public Member Functions

 CoreGraphicsContext (CGContextRef context, float flipHeight, float targetScale)
 
 ~CoreGraphicsContext () override
 
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 = false
 
CGColorSpaceRef rgbColourSpace
 
std::unique_ptr< SavedStatestate
 
OwnedArray< SavedStatestateStack
 
float targetScale
 

Constructor & Destructor Documentation

◆ CoreGraphicsContext()

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

◆ ~CoreGraphicsContext()

juce::CoreGraphicsContext::~CoreGraphicsContext ( )
override

Member Function Documentation

◆ addTransform()

void juce::CoreGraphicsContext::addTransform ( const AffineTransform )
overridevirtual

Implements juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ applyTransform()

void juce::CoreGraphicsContext::applyTransform ( const AffineTransform ) const
private

◆ beginTransparencyLayer()

void juce::CoreGraphicsContext::beginTransparencyLayer ( float  opacity)
overridevirtual

Implements juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ clipRegionIntersects()

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

Implements juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ clipToImageAlpha()

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

Implements juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ clipToPath()

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

Implements juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ clipToRectangle()

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

Implements juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ clipToRectangleList()

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

Implements juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ clipToRectangleListWithoutTest()

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

◆ createPath() [1/2]

void juce::CoreGraphicsContext::createPath ( const Path ) const
private

◆ createPath() [2/2]

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

◆ drawGlyph()

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

Implements juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ drawGradient()

void juce::CoreGraphicsContext::drawGradient ( )
private

◆ drawImage() [1/2]

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

Implements juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ drawImage() [2/2]

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

◆ drawLine()

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

Implements juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ drawTextLayout()

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

Reimplemented from juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ endTransparencyLayer()

void juce::CoreGraphicsContext::endTransparencyLayer ( )
overridevirtual

Implements juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ excludeClipRectangle()

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

Implements juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ fillCGRect()

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

◆ fillPath()

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

Implements juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ fillRect() [1/2]

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

Implements juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ fillRect() [2/2]

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

◆ fillRectList()

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

Implements juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ flip()

void juce::CoreGraphicsContext::flip ( ) const
private

◆ getClipBounds()

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

Implements juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ getFont()

const Font& juce::CoreGraphicsContext::getFont ( )
overridevirtual

Implements juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ getPhysicalPixelScaleFactor()

float juce::CoreGraphicsContext::getPhysicalPixelScaleFactor ( )
overridevirtual

Implements juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ isClipEmpty()

bool juce::CoreGraphicsContext::isClipEmpty ( ) const
overridevirtual

Implements juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ isVectorDevice()

◆ restoreState()

void juce::CoreGraphicsContext::restoreState ( )
overridevirtual

Implements juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ saveState()

void juce::CoreGraphicsContext::saveState ( )
overridevirtual

Implements juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ setFill()

void juce::CoreGraphicsContext::setFill ( const FillType )
overridevirtual

Implements juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ setFont()

void juce::CoreGraphicsContext::setFont ( const Font )
overridevirtual

Implements juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ setInterpolationQuality()

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

Implements juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ setOpacity()

void juce::CoreGraphicsContext::setOpacity ( float  )
overridevirtual

Implements juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

◆ setOrigin()

void juce::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 juce::LowLevelGraphicsContext.

Referenced by isVectorDevice().

Member Data Documentation

◆ context

CGContextRef juce::CoreGraphicsContext::context
private

◆ flipHeight

const CGFloat juce::CoreGraphicsContext::flipHeight
private

◆ greyColourSpace

CGColorSpaceRef juce::CoreGraphicsContext::greyColourSpace
private

◆ lastClipRect

Rectangle<int> juce::CoreGraphicsContext::lastClipRect
mutableprivate

◆ lastClipRectIsValid

bool juce::CoreGraphicsContext::lastClipRectIsValid = false
mutableprivate

◆ rgbColourSpace

CGColorSpaceRef juce::CoreGraphicsContext::rgbColourSpace
private

◆ state

std::unique_ptr<SavedState> juce::CoreGraphicsContext::state
private

◆ stateStack

OwnedArray<SavedState> juce::CoreGraphicsContext::stateStack
private

◆ targetScale

float juce::CoreGraphicsContext::targetScale
private

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