Loading...
Searching...
No Matches
juce::LowLevelGraphicsSoftwareRenderer Class Reference

## 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.

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

- juce_graphics/contexts/juce_LowLevelGraphicsSoftwareRenderer.h

Inheritance 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.
std::unique_ptr< ImageType > | getPreferredImageTypeForTemporaryImages () const override
| Returns the optimal ImageType for creating temporary images in this GraphicsContext.
bool | isVectorDevice () const override
| Returns true if this device is vector-based, e.g.
Rectangle< int > | getClipBounds () const override
bool | isClipEmpty () const override
void | setOrigin (Point< int > o) override
| Moves the origin to a new position.
void | addTransform (const AffineTransform &t) override
float | getPhysicalPixelScaleFactor () const override
bool | clipRegionIntersects (const Rectangle< int > &r) override
bool | clipToRectangle (const Rectangle< int > &r) override
bool | clipToRectangleList (const RectangleList< int > &r) override
void | excludeClipRectangle (const Rectangle< int > &r) override
void | clipToPath (const Path &path, const AffineTransform &t) override
void | clipToImageAlpha (const Image &im, const AffineTransform &t) override
void | saveState () override
void | restoreState () override
void | beginTransparencyLayer (float opacity) override
void | endTransparencyLayer () override
void | setFill (const FillType &fillType) override
void | setOpacity (float newOpacity) override
void | setInterpolationQuality (Graphics::ResamplingQuality quality) override
void | fillRect (const Rectangle< int > &r, bool replace) override
void | fillRect (const Rectangle< float > &r) override
void | fillRectList (const RectangleList< float > &list) override
void | fillPath (const Path &path, const AffineTransform &t) override
void | drawImage (const Image &im, const AffineTransform &t) override
void | drawLine (const Line< float > &line) override
void | setFont (const Font &newFont) override
const Font & | getFont () override
uint64_t | getFrameId () const override
| Returns an integer that uniquely identifies the current frame.
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.
Public Member Functions inherited from juce::LowLevelGraphicsContext
virtual | ~LowLevelGraphicsContext ()=default
virtual void | fillAll ()
virtual void | drawRect (const Rectangle< float > &rect, float lineThickness)
virtual void | strokePath (const Path &path, const PathStrokeType &strokeType, const AffineTransform &transform)
virtual void | drawLineWithThickness (const Line< float > &line, float lineThickness)
virtual void | drawRoundedRectangle (const Rectangle< float > &r, float cornerSize, float lineThickness)
virtual void | fillRoundedRectangle (const Rectangle< float > &r, float cornerSize)
virtual void | drawEllipse (const Rectangle< float > &area, float lineThickness)
virtual void | fillEllipse (const Rectangle< float > &area)

## Additional Inherited Members

Protected Member Functions inherited from juce::LowLevelGraphicsContext
| LowLevelGraphicsContext ()=default

## Constructors and Destructors

## LowLevelGraphicsSoftwareRenderer() [1/2]

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

Creates a context to render into an image.

Referenced by drawGlyphs().

## 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 Functions

## getPreferredImageTypeForTemporaryImages()

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

inline override virtual

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.

## isVectorDevice()

bool juce::LowLevelGraphicsSoftwareRenderer::isVectorDevice | ( |  | ) | const

override virtual

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

a printer.

Implements juce::LowLevelGraphicsContext.

## getClipBounds()

Rectangle< int > juce::LowLevelGraphicsSoftwareRenderer::getClipBounds | ( |  | ) | const

override virtual

Implements juce::LowLevelGraphicsContext.

## isClipEmpty()

bool juce::LowLevelGraphicsSoftwareRenderer::isClipEmpty | ( |  | ) | const

override virtual

Implements juce::LowLevelGraphicsContext.

## setOrigin()

void juce::LowLevelGraphicsSoftwareRenderer::setOrigin | ( | Point< int > |  | ) |

override virtual

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.

## addTransform()

void juce::LowLevelGraphicsSoftwareRenderer::addTransform | ( | const AffineTransform & | t | ) |

override virtual

Implements juce::LowLevelGraphicsContext.

## getPhysicalPixelScaleFactor()

float juce::LowLevelGraphicsSoftwareRenderer::getPhysicalPixelScaleFactor | ( |  | ) | const

override virtual

Implements juce::LowLevelGraphicsContext.

## clipRegionIntersects()

bool juce::LowLevelGraphicsSoftwareRenderer::clipRegionIntersects | ( | const Rectangle< int > & | r | ) |

override virtual

Implements juce::LowLevelGraphicsContext.

## clipToRectangle()

bool juce::LowLevelGraphicsSoftwareRenderer::clipToRectangle | ( | const Rectangle< int > & | r | ) |

override virtual

Implements juce::LowLevelGraphicsContext.

## clipToRectangleList()

bool juce::LowLevelGraphicsSoftwareRenderer::clipToRectangleList | ( | const RectangleList< int > & | r | ) |

override virtual

Implements juce::LowLevelGraphicsContext.

## excludeClipRectangle()

void juce::LowLevelGraphicsSoftwareRenderer::excludeClipRectangle | ( | const Rectangle< int > & | r | ) |

override virtual

Implements juce::LowLevelGraphicsContext.

## clipToPath()

void juce::LowLevelGraphicsSoftwareRenderer::clipToPath | ( | const Path & | path,
|  | const AffineTransform & | t )

override virtual

Implements juce::LowLevelGraphicsContext.

## clipToImageAlpha()

void juce::LowLevelGraphicsSoftwareRenderer::clipToImageAlpha | ( | const Image & | im,
|  | const AffineTransform & | t )

override virtual

Implements juce::LowLevelGraphicsContext.

## saveState()

void juce::LowLevelGraphicsSoftwareRenderer::saveState | ( |  | ) |

override virtual

Implements juce::LowLevelGraphicsContext.

## restoreState()

void juce::LowLevelGraphicsSoftwareRenderer::restoreState | ( |  | ) |

override virtual

Implements juce::LowLevelGraphicsContext.

## beginTransparencyLayer()

void juce::LowLevelGraphicsSoftwareRenderer::beginTransparencyLayer | ( | float | opacity | ) |

override virtual

Implements juce::LowLevelGraphicsContext.

## endTransparencyLayer()

void juce::LowLevelGraphicsSoftwareRenderer::endTransparencyLayer | ( |  | ) |

override virtual

Implements juce::LowLevelGraphicsContext.

## setFill()

void juce::LowLevelGraphicsSoftwareRenderer::setFill | ( | const FillType & | fillType | ) |

override virtual

Implements juce::LowLevelGraphicsContext.

## setOpacity()

void juce::LowLevelGraphicsSoftwareRenderer::setOpacity | ( | float | newOpacity | ) |

override virtual

Implements juce::LowLevelGraphicsContext.

## setInterpolationQuality()

void juce::LowLevelGraphicsSoftwareRenderer::setInterpolationQuality | ( | Graphics::ResamplingQuality | quality | ) |

override virtual

Implements juce::LowLevelGraphicsContext.

## fillRect() [1/2]

void juce::LowLevelGraphicsSoftwareRenderer::fillRect | ( | const Rectangle< int > & | r,
|  | bool | replace )

override virtual

Implements juce::LowLevelGraphicsContext.

## fillRect() [2/2]

void juce::LowLevelGraphicsSoftwareRenderer::fillRect | ( | const Rectangle< float > & | r | ) |

override virtual

Implements juce::LowLevelGraphicsContext.

## fillRectList()

void juce::LowLevelGraphicsSoftwareRenderer::fillRectList | ( | const RectangleList< float > & | list | ) |

override virtual

Implements juce::LowLevelGraphicsContext.

## fillPath()

void juce::LowLevelGraphicsSoftwareRenderer::fillPath | ( | const Path & | path,
|  | const AffineTransform & | t )

override virtual

Implements juce::LowLevelGraphicsContext.

## drawImage()

void juce::LowLevelGraphicsSoftwareRenderer::drawImage | ( | const Image & | im,
|  | const AffineTransform & | t )

override virtual

Implements juce::LowLevelGraphicsContext.

## drawLine()

void juce::LowLevelGraphicsSoftwareRenderer::drawLine | ( | const Line< float > & | line | ) |

override virtual

Implements juce::LowLevelGraphicsContext.

## setFont()

void juce::LowLevelGraphicsSoftwareRenderer::setFont | ( | const Font & | newFont | ) |

override virtual

Implements juce::LowLevelGraphicsContext.

## getFont()

const Font & juce::LowLevelGraphicsSoftwareRenderer::getFont | ( |  | ) |

override virtual

Implements juce::LowLevelGraphicsContext.

## getFrameId()

uint64_t juce::LowLevelGraphicsSoftwareRenderer::getFrameId | ( |  | ) | const

override virtual

Returns an integer that uniquely identifies the current frame.

Useful for debugging/logging.

Implements juce::LowLevelGraphicsContext.

## drawGlyphs()

void juce::LowLevelGraphicsSoftwareRenderer::drawGlyphs | ( | Span< const uint16_t > | ,
|  | Span< const Point< float > > | ,
|  | const AffineTransform & | )

override virtual

Uses the current font to draw the provided glyph numbers.

Implements juce::LowLevelGraphicsContext.

References LowLevelGraphicsSoftwareRenderer().

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited