JUCE v8.0.9
JUCE API
 
Loading...
Searching...
No Matches
juce::LowLevelGraphicsSoftwareRenderer Class Reference

A lowest-common-denominator implementation of LowLevelGraphicsContext that does all its rendering in memory. More...

#include <juce_LowLevelGraphicsSoftwareRenderer.h>

Inheritance diagram for juce::LowLevelGraphicsSoftwareRenderer:
Collaboration diagram for juce::LowLevelGraphicsSoftwareRenderer:

Public Member Functions

 LowLevelGraphicsSoftwareRenderer (const Image &imageToRenderOnto)
 Creates a context to render into an image.
 
 LowLevelGraphicsSoftwareRenderer (const Image &imageToRenderOnto, Point< int > origin, const RectangleList< int > &initialClip)
 Creates a context to render into a clipped subsection of an image.
 
 ~LowLevelGraphicsSoftwareRenderer () override
 Destructor.
 
void addTransform (const AffineTransform &t) override
 
void beginTransparencyLayer (float opacity) override
 
bool clipRegionIntersects (const Rectangle< int > &r) override
 
void clipToImageAlpha (const Image &im, const AffineTransform &t) override
 
void clipToPath (const Path &path, const AffineTransform &t) override
 
bool clipToRectangle (const Rectangle< int > &r) override
 
bool clipToRectangleList (const RectangleList< int > &r) override
 
virtual void drawEllipse (const Rectangle< float > &area, float lineThickness)
 
void drawGlyphs (Span< const uint16_t > glyphs, Span< const Point< float > > positions, const AffineTransform &t) override
 Uses the current font to draw the provided glyph numbers.
 
void drawImage (const Image &im, const AffineTransform &t) override
 
void drawLine (const Line< float > &line) override
 
virtual void drawLineWithThickness (const Line< float > &line, float lineThickness)
 
virtual void drawRect (const Rectangle< float > &rect, float lineThickness)
 
virtual void drawRoundedRectangle (const Rectangle< float > &r, float cornerSize, float lineThickness)
 
void endTransparencyLayer () override
 
void excludeClipRectangle (const Rectangle< int > &r) override
 
virtual void fillAll ()
 
virtual void fillEllipse (const Rectangle< float > &area)
 
void fillPath (const Path &path, const AffineTransform &t) override
 
void fillRect (const Rectangle< float > &r) override
 
void fillRect (const Rectangle< int > &r, bool replace) override
 
void fillRectList (const RectangleList< float > &list) override
 
virtual void fillRoundedRectangle (const Rectangle< float > &r, float cornerSize)
 
Rectangle< int > getClipBounds () const override
 
const FontgetFont () override
 
uint64_t getFrameId () const override
 Returns an integer that uniquely identifies the current frame.
 
float getPhysicalPixelScaleFactor () const override
 
std::unique_ptr< ImageTypegetPreferredImageTypeForTemporaryImages () const override
 Returns the optimal ImageType for creating temporary images in this GraphicsContext.
 
bool isClipEmpty () const override
 
bool isVectorDevice () const override
 Returns true if this device is vector-based, e.g.
 
void restoreState () override
 
void saveState () override
 
void setFill (const FillType &fillType) override
 
void setFont (const Font &newFont) override
 
void setInterpolationQuality (Graphics::ResamplingQuality quality) override
 
void setOpacity (float newOpacity) override
 
void setOrigin (Point< int > o) override
 Moves the origin to a new position.
 
virtual void strokePath (const Path &path, const PathStrokeType &strokeType, const AffineTransform &transform)
 

Protected Member Functions

void drawGlyph (uint16_t i, const AffineTransform &t)
 

Protected Attributes

uint64_t frame
 
RenderingHelpers::SavedStateStack< RenderingHelpers::SoftwareRendererSavedStatestack
 

Detailed Description

A lowest-common-denominator implementation of LowLevelGraphicsContext that does all its rendering in memory.

User code is not supposed to create instances of this class directly - do all your rendering via the Graphics class instead.

@tags{Graphics}

Constructor & Destructor Documentation

◆ LowLevelGraphicsSoftwareRenderer() [1/2]

juce::LowLevelGraphicsSoftwareRenderer::LowLevelGraphicsSoftwareRenderer ( const Image imageToRenderOnto)

Creates a context to render into an image.

◆ LowLevelGraphicsSoftwareRenderer() [2/2]

juce::LowLevelGraphicsSoftwareRenderer::LowLevelGraphicsSoftwareRenderer ( const Image imageToRenderOnto,
Point< int >  origin,
const RectangleList< int > &  initialClip 
)

Creates a context to render into a clipped subsection of an image.

◆ ~LowLevelGraphicsSoftwareRenderer()

juce::LowLevelGraphicsSoftwareRenderer::~LowLevelGraphicsSoftwareRenderer ( )
override

Destructor.

Member Function Documentation

◆ addTransform()

◆ beginTransparencyLayer()

void juce::RenderingHelpers::StackBasedLowLevelGraphicsContext< RenderingHelpers::SoftwareRendererSavedState >::beginTransparencyLayer ( float  opacity)
inlineoverridevirtualinherited

◆ clipRegionIntersects()

bool juce::RenderingHelpers::StackBasedLowLevelGraphicsContext< RenderingHelpers::SoftwareRendererSavedState >::clipRegionIntersects ( const Rectangle< int > &  r)
inlineoverridevirtualinherited

◆ clipToImageAlpha()

void juce::RenderingHelpers::StackBasedLowLevelGraphicsContext< RenderingHelpers::SoftwareRendererSavedState >::clipToImageAlpha ( const Image im,
const AffineTransform t 
)
inlineoverridevirtualinherited

◆ clipToPath()

void juce::RenderingHelpers::StackBasedLowLevelGraphicsContext< RenderingHelpers::SoftwareRendererSavedState >::clipToPath ( const Path path,
const AffineTransform t 
)
inlineoverridevirtualinherited

◆ clipToRectangle()

◆ clipToRectangleList()

◆ drawEllipse()

virtual void juce::LowLevelGraphicsContext::drawEllipse ( const Rectangle< float > &  area,
float  lineThickness 
)
inlinevirtualinherited

◆ drawGlyph()

void juce::RenderingHelpers::StackBasedLowLevelGraphicsContext< RenderingHelpers::SoftwareRendererSavedState >::drawGlyph ( uint16_t  i,
const AffineTransform t 
)
inlineprotectedinherited

◆ drawGlyphs()

void juce::RenderingHelpers::StackBasedLowLevelGraphicsContext< RenderingHelpers::SoftwareRendererSavedState >::drawGlyphs ( Span< const uint16_t >  glyphs,
Span< const Point< float > >  positions,
const AffineTransform t 
)
inlineoverridevirtualinherited

Uses the current font to draw the provided glyph numbers.

Implements juce::LowLevelGraphicsContext.

◆ drawImage()

void juce::RenderingHelpers::StackBasedLowLevelGraphicsContext< RenderingHelpers::SoftwareRendererSavedState >::drawImage ( const Image im,
const AffineTransform t 
)
inlineoverridevirtualinherited

◆ drawLine()

◆ drawLineWithThickness()

virtual void juce::LowLevelGraphicsContext::drawLineWithThickness ( const Line< float > &  line,
float  lineThickness 
)
inlinevirtualinherited

◆ drawRect()

virtual void juce::LowLevelGraphicsContext::drawRect ( const Rectangle< float > &  rect,
float  lineThickness 
)
inlinevirtualinherited

◆ drawRoundedRectangle()

virtual void juce::LowLevelGraphicsContext::drawRoundedRectangle ( const Rectangle< float > &  r,
float  cornerSize,
float  lineThickness 
)
inlinevirtualinherited

◆ endTransparencyLayer()

◆ excludeClipRectangle()

void juce::RenderingHelpers::StackBasedLowLevelGraphicsContext< RenderingHelpers::SoftwareRendererSavedState >::excludeClipRectangle ( const Rectangle< int > &  r)
inlineoverridevirtualinherited

◆ fillAll()

virtual void juce::LowLevelGraphicsContext::fillAll ( )
inlinevirtualinherited

Reimplemented in juce::CoreGraphicsContext.

◆ fillEllipse()

virtual void juce::LowLevelGraphicsContext::fillEllipse ( const Rectangle< float > &  area)
inlinevirtualinherited

◆ fillPath()

void juce::RenderingHelpers::StackBasedLowLevelGraphicsContext< RenderingHelpers::SoftwareRendererSavedState >::fillPath ( const Path path,
const AffineTransform t 
)
inlineoverridevirtualinherited

◆ fillRect() [1/2]

◆ fillRect() [2/2]

void juce::RenderingHelpers::StackBasedLowLevelGraphicsContext< RenderingHelpers::SoftwareRendererSavedState >::fillRect ( const Rectangle< int > &  r,
bool  replace 
)
inlineoverridevirtualinherited

◆ fillRectList()

◆ fillRoundedRectangle()

virtual void juce::LowLevelGraphicsContext::fillRoundedRectangle ( const Rectangle< float > &  r,
float  cornerSize 
)
inlinevirtualinherited

◆ getClipBounds()

◆ getFont()

◆ getFrameId()

Returns an integer that uniquely identifies the current frame.

Useful for debugging/logging.

Implements juce::LowLevelGraphicsContext.

◆ getPhysicalPixelScaleFactor()

float juce::RenderingHelpers::StackBasedLowLevelGraphicsContext< RenderingHelpers::SoftwareRendererSavedState >::getPhysicalPixelScaleFactor ( ) const
inlineoverridevirtualinherited

◆ getPreferredImageTypeForTemporaryImages()

std::unique_ptr< ImageType > juce::LowLevelGraphicsSoftwareRenderer::getPreferredImageTypeForTemporaryImages ( ) const
inlineoverridevirtual

Returns the optimal ImageType for creating temporary images in this GraphicsContext.

While this typically matches the GraphicsContext's native ImageType, certain scenarios may benefit from using a different format for temporary operations (e.g., for performance, memory efficiency, or specific rendering requirements).

Returns
A unique_ptr to the recommended ImageType instance for temporary images

Implements juce::LowLevelGraphicsContext.

◆ isClipEmpty()

◆ isVectorDevice()

Returns true if this device is vector-based, e.g.

a printer.

Implements juce::LowLevelGraphicsContext.

◆ restoreState()

◆ saveState()

◆ setFill()

◆ setFont()

◆ setInterpolationQuality()

◆ setOpacity()

◆ setOrigin()

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.

◆ strokePath()

virtual void juce::LowLevelGraphicsContext::strokePath ( const Path path,
const PathStrokeType strokeType,
const AffineTransform transform 
)
inlinevirtualinherited

Member Data Documentation

◆ frame

◆ stack


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