Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LowLevelGraphicsPostScriptRenderer Class Reference

An implementation of LowLevelGraphicsContext that turns the drawing operations into a PostScript document. More...

#include <juce_LowLevelGraphicsPostScriptRenderer.h>

Inheritance diagram for LowLevelGraphicsPostScriptRenderer:

Classes

struct  SavedState
 Describes a saved state. More...
 

Public Member Functions

 LowLevelGraphicsPostScriptRenderer (OutputStream &resultingPostScript, const String &documentTitle, int totalWidth, int totalHeight)
 
bool isVectorDevice () const override
 Returns true if this device is vector-based, e.g.
 
void setOrigin (Point< int >) override
 Moves the origin to a new position.
 
void addTransform (const AffineTransform &) override
 
float getPhysicalPixelScaleFactor () const override
 
bool clipToRectangle (const Rectangle< int > &) override
 
bool clipToRectangleList (const RectangleList< int > &) override
 
void excludeClipRectangle (const Rectangle< int > &) override
 
void clipToPath (const Path &, const AffineTransform &) override
 
void clipToImageAlpha (const Image &, const AffineTransform &) override
 
void saveState () override
 
void restoreState () override
 
void beginTransparencyLayer (float) override
 
void endTransparencyLayer () override
 
bool clipRegionIntersects (const Rectangle< int > &) override
 
Rectangle< intgetClipBounds () const override
 
bool isClipEmpty () const override
 
void setFill (const FillType &) override
 
void setOpacity (float) override
 
void setInterpolationQuality (Graphics::ResamplingQuality) override
 
void fillRect (const Rectangle< int > &, bool replaceExistingContents) override
 
void fillRect (const Rectangle< float > &) override
 
void fillRectList (const RectangleList< float > &) override
 
void fillPath (const Path &, const AffineTransform &) override
 
void drawImage (const Image &, const AffineTransform &) override
 
void drawLine (const Line< float > &) override
 
const FontgetFont () override
 
void setFont (const Font &) override
 
void drawGlyphs (Span< const uint16_t > glyphs, Span< const Point< float > > positions, const AffineTransform &) override
 Uses the current font to draw the provided glyph numbers.
 
- Public Member Functions inherited from 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)
 
virtual uint64_t getFrameId () const =0
 Returns an integer that uniquely identifies the current frame.
 

Protected Member Functions

void writeClip ()
 
void writeColour (Colour colour)
 
void writePath (const Path &) const
 
void writeXY (float x, float y) const
 
void writeTransform (const AffineTransform &) const
 
void writeImage (const Image &, int sx, int sy, int maxW, int maxH) const
 
- Protected Member Functions inherited from LowLevelGraphicsContext
 LowLevelGraphicsContext ()=default
 

Protected Attributes

OutputStreamout
 
int totalWidth
 
int totalHeight
 
bool needToClip
 
Colour lastColour
 
OwnedArray< SavedStatestateStack
 

Detailed Description

An implementation of LowLevelGraphicsContext that turns the drawing operations into a PostScript document.

Constructor & Destructor Documentation

◆ LowLevelGraphicsPostScriptRenderer()

LowLevelGraphicsPostScriptRenderer::LowLevelGraphicsPostScriptRenderer ( OutputStream & resultingPostScript,
const String & documentTitle,
int totalWidth,
int totalHeight )

Member Function Documentation

◆ isVectorDevice()

bool LowLevelGraphicsPostScriptRenderer::isVectorDevice ( ) const
overridevirtual

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

a printer.

Implements LowLevelGraphicsContext.

◆ setOrigin()

void LowLevelGraphicsPostScriptRenderer::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.

◆ addTransform()

void LowLevelGraphicsPostScriptRenderer::addTransform ( const AffineTransform & )
overridevirtual

◆ getPhysicalPixelScaleFactor()

float LowLevelGraphicsPostScriptRenderer::getPhysicalPixelScaleFactor ( ) const
overridevirtual

◆ clipToRectangle()

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

◆ clipToRectangleList()

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

◆ excludeClipRectangle()

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

◆ clipToPath()

void LowLevelGraphicsPostScriptRenderer::clipToPath ( const Path & ,
const AffineTransform &  )
overridevirtual

◆ clipToImageAlpha()

void LowLevelGraphicsPostScriptRenderer::clipToImageAlpha ( const Image & ,
const AffineTransform &  )
overridevirtual

◆ saveState()

void LowLevelGraphicsPostScriptRenderer::saveState ( )
overridevirtual

◆ restoreState()

void LowLevelGraphicsPostScriptRenderer::restoreState ( )
overridevirtual

◆ beginTransparencyLayer()

void LowLevelGraphicsPostScriptRenderer::beginTransparencyLayer ( float )
overridevirtual

◆ endTransparencyLayer()

void LowLevelGraphicsPostScriptRenderer::endTransparencyLayer ( )
overridevirtual

◆ clipRegionIntersects()

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

◆ getClipBounds()

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

◆ isClipEmpty()

bool LowLevelGraphicsPostScriptRenderer::isClipEmpty ( ) const
overridevirtual

◆ setFill()

void LowLevelGraphicsPostScriptRenderer::setFill ( const FillType & )
overridevirtual

◆ setOpacity()

void LowLevelGraphicsPostScriptRenderer::setOpacity ( float )
overridevirtual

◆ setInterpolationQuality()

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

◆ fillRect() [1/2]

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

◆ fillRect() [2/2]

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

◆ fillRectList()

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

◆ fillPath()

void LowLevelGraphicsPostScriptRenderer::fillPath ( const Path & ,
const AffineTransform &  )
overridevirtual

◆ drawImage()

void LowLevelGraphicsPostScriptRenderer::drawImage ( const Image & ,
const AffineTransform &  )
overridevirtual

◆ drawLine()

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

◆ getFont()

const Font & LowLevelGraphicsPostScriptRenderer::getFont ( )
overridevirtual

◆ setFont()

void LowLevelGraphicsPostScriptRenderer::setFont ( const Font & )
overridevirtual

◆ drawGlyphs()

void LowLevelGraphicsPostScriptRenderer::drawGlyphs ( Span< const uint16_t > ,
Span< const Point< float > > ,
const AffineTransform &  )
overridevirtual

Uses the current font to draw the provided glyph numbers.

Implements LowLevelGraphicsContext.

◆ writeClip()

void LowLevelGraphicsPostScriptRenderer::writeClip ( )
protected

◆ writeColour()

void LowLevelGraphicsPostScriptRenderer::writeColour ( Colour colour)
protected

◆ writePath()

void LowLevelGraphicsPostScriptRenderer::writePath ( const Path & ) const
protected

◆ writeXY()

void LowLevelGraphicsPostScriptRenderer::writeXY ( float x,
float y ) const
protected

◆ writeTransform()

void LowLevelGraphicsPostScriptRenderer::writeTransform ( const AffineTransform & ) const
protected

◆ writeImage()

void LowLevelGraphicsPostScriptRenderer::writeImage ( const Image & ,
int sx,
int sy,
int maxW,
int maxH ) const
protected

Member Data Documentation

◆ out

OutputStream& LowLevelGraphicsPostScriptRenderer::out
protected

◆ totalWidth

int LowLevelGraphicsPostScriptRenderer::totalWidth
protected

◆ totalHeight

int LowLevelGraphicsPostScriptRenderer::totalHeight
protected

◆ needToClip

bool LowLevelGraphicsPostScriptRenderer::needToClip
protected

◆ lastColour

Colour LowLevelGraphicsPostScriptRenderer::lastColour
protected

◆ stateStack

OwnedArray<SavedState> LowLevelGraphicsPostScriptRenderer::stateStack
protected

The documentation for this class was generated from the following file:
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram