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

#include <juce_Direct2DHwndContext_windows.h>

Inheritance diagram for juce::Direct2DHwndContext:
Collaboration diagram for juce::Direct2DHwndContext:

Classes

struct  SwapchainDelegate
 

Public Member Functions

 Direct2DHwndContext (HWND windowHandle, SwapchainDelegate &swapDelegate)
 
 ~Direct2DHwndContext () override
 
void addDeferredRepaint (Rectangle< int > deferredRepaint)
 
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
 
Image createSnapshot () const override
 
void drawEllipse (const Rectangle< float > &area, float lineThickness) override
 
void drawGlyphs (Span< const uint16_t >, Span< const Point< float > >, const AffineTransform &) override
 Uses the current font to draw the provided glyph numbers.
 
void drawImage (const Image &sourceImage, const AffineTransform &) override
 
void drawLine (const Line< float > &) override
 
void drawLineWithThickness (const Line< float > &, float) override
 
void drawRect (const Rectangle< float > &, float) override
 
void drawRoundedRectangle (const Rectangle< float > &area, float cornerSize, float lineThickness) override
 
void endFrame ()
 
void endTransparencyLayer () override
 
void excludeClipRectangle (const Rectangle< int > &) override
 
virtual void fillAll ()
 
void fillEllipse (const Rectangle< float > &area) override
 
void fillPath (const Path &, const AffineTransform &) override
 
void fillRect (const Rectangle< float > &) override
 
void fillRect (const Rectangle< int > &, bool replaceExistingContents) override
 
void fillRectList (const RectangleList< float > &) override
 
void fillRoundedRectangle (const Rectangle< float > &area, float cornerSize) override
 
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.
 
void handleShowWindow ()
 
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 &) 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.
 
bool startFrame (float dpiScale)
 
void strokePath (const Path &, const PathStrokeType &strokeType, const AffineTransform &) override
 

Public Attributes

Direct2DMetrics::Ptr metrics
 

Protected Member Functions

void applyPendingClipList ()
 
template<typename Shape , typename Fn >
void paintPrimitive (const Shape &shape, Fn &&primitiveOp)
 
void resetPendingClipList ()
 

Static Protected Member Functions

static Line< floatoffsetShape (Line< float > a, Point< float > b)
 
static Rectangle< floatoffsetShape (Rectangle< float > a, Point< float > b)
 
static RectangleList< floatoffsetShape (RectangleList< float > a, Point< float > b)
 

Protected Attributes

SavedState * currentState = nullptr
 
uint64_t frame = 0
 
PendingClipList pendingClipList
 

Private Member Functions

void clearTargetBuffer () override
 
PimplgetPimpl () const noexcept override
 

Private Attributes

std::unique_ptr< HwndPimpl > pimpl
 

Constructor & Destructor Documentation

◆ Direct2DHwndContext()

juce::Direct2DHwndContext::Direct2DHwndContext ( HWND  windowHandle,
SwapchainDelegate swapDelegate 
)

◆ ~Direct2DHwndContext()

juce::Direct2DHwndContext::~Direct2DHwndContext ( )
override

Member Function Documentation

◆ addDeferredRepaint()

void juce::Direct2DHwndContext::addDeferredRepaint ( Rectangle< int >  deferredRepaint)

◆ addTransform()

void juce::Direct2DGraphicsContext::addTransform ( const AffineTransform )
overridevirtualinherited

◆ applyPendingClipList()

void juce::Direct2DGraphicsContext::applyPendingClipList ( )
protectedinherited

◆ beginTransparencyLayer()

void juce::Direct2DGraphicsContext::beginTransparencyLayer ( float  opacity)
overridevirtualinherited

◆ clearTargetBuffer()

void juce::Direct2DHwndContext::clearTargetBuffer ( )
overrideprivatevirtual

◆ clipRegionIntersects()

bool juce::Direct2DGraphicsContext::clipRegionIntersects ( const Rectangle< int > &  )
overridevirtualinherited

◆ clipToImageAlpha()

void juce::Direct2DGraphicsContext::clipToImageAlpha ( const Image ,
const AffineTransform  
)
overridevirtualinherited

◆ clipToPath()

void juce::Direct2DGraphicsContext::clipToPath ( const Path ,
const AffineTransform  
)
overridevirtualinherited

◆ clipToRectangle()

bool juce::Direct2DGraphicsContext::clipToRectangle ( const Rectangle< int > &  )
overridevirtualinherited

◆ clipToRectangleList()

bool juce::Direct2DGraphicsContext::clipToRectangleList ( const RectangleList< int > &  )
overridevirtualinherited

◆ createSnapshot()

Image juce::Direct2DHwndContext::createSnapshot ( ) const
overridevirtual

Reimplemented from juce::Direct2DGraphicsContext.

◆ drawEllipse()

void juce::Direct2DGraphicsContext::drawEllipse ( const Rectangle< float > &  area,
float  lineThickness 
)
overridevirtualinherited

Reimplemented from juce::LowLevelGraphicsContext.

◆ drawGlyphs()

void juce::Direct2DGraphicsContext::drawGlyphs ( Span< const uint16_t >  ,
Span< const Point< float > >  ,
const AffineTransform  
)
overridevirtualinherited

Uses the current font to draw the provided glyph numbers.

Implements juce::LowLevelGraphicsContext.

◆ drawImage()

void juce::Direct2DGraphicsContext::drawImage ( const Image sourceImage,
const AffineTransform  
)
overridevirtualinherited

◆ drawLine()

void juce::Direct2DGraphicsContext::drawLine ( const Line< float > &  )
overridevirtualinherited

◆ drawLineWithThickness()

void juce::Direct2DGraphicsContext::drawLineWithThickness ( const Line< float > &  ,
float   
)
overridevirtualinherited

Reimplemented from juce::LowLevelGraphicsContext.

◆ drawRect()

void juce::Direct2DGraphicsContext::drawRect ( const Rectangle< float > &  ,
float   
)
overridevirtualinherited

Reimplemented from juce::LowLevelGraphicsContext.

◆ drawRoundedRectangle()

void juce::Direct2DGraphicsContext::drawRoundedRectangle ( const Rectangle< float > &  area,
float  cornerSize,
float  lineThickness 
)
overridevirtualinherited

Reimplemented from juce::LowLevelGraphicsContext.

◆ endFrame()

void juce::Direct2DGraphicsContext::endFrame ( )
inherited

◆ endTransparencyLayer()

void juce::Direct2DGraphicsContext::endTransparencyLayer ( )
overridevirtualinherited

◆ excludeClipRectangle()

void juce::Direct2DGraphicsContext::excludeClipRectangle ( const Rectangle< int > &  )
overridevirtualinherited

◆ fillAll()

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

Reimplemented in juce::CoreGraphicsContext.

◆ fillEllipse()

void juce::Direct2DGraphicsContext::fillEllipse ( const Rectangle< float > &  area)
overridevirtualinherited

Reimplemented from juce::LowLevelGraphicsContext.

◆ fillPath()

void juce::Direct2DGraphicsContext::fillPath ( const Path ,
const AffineTransform  
)
overridevirtualinherited

◆ fillRect() [1/2]

void juce::Direct2DGraphicsContext::fillRect ( const Rectangle< float > &  )
overridevirtualinherited

◆ fillRect() [2/2]

void juce::Direct2DGraphicsContext::fillRect ( const Rectangle< int > &  ,
bool  replaceExistingContents 
)
overridevirtualinherited

◆ fillRectList()

void juce::Direct2DGraphicsContext::fillRectList ( const RectangleList< float > &  )
overridevirtualinherited

◆ fillRoundedRectangle()

void juce::Direct2DGraphicsContext::fillRoundedRectangle ( const Rectangle< float > &  area,
float  cornerSize 
)
overridevirtualinherited

Reimplemented from juce::LowLevelGraphicsContext.

◆ getClipBounds()

Rectangle< int > juce::Direct2DGraphicsContext::getClipBounds ( ) const
overridevirtualinherited

◆ getFont()

const Font & juce::Direct2DGraphicsContext::getFont ( )
overridevirtualinherited

◆ getFrameId()

uint64_t juce::Direct2DGraphicsContext::getFrameId ( ) const
inlineoverridevirtualinherited

Returns an integer that uniquely identifies the current frame.

Useful for debugging/logging.

Implements juce::LowLevelGraphicsContext.

References juce::Direct2DGraphicsContext::frame.

Referenced by juce::Direct2DGraphicsContext::Pimpl::getFrameId().

◆ getPhysicalPixelScaleFactor()

float juce::Direct2DGraphicsContext::getPhysicalPixelScaleFactor ( ) const
overridevirtualinherited

◆ getPimpl()

Pimpl * juce::Direct2DHwndContext::getPimpl ( ) const
overrideprivatevirtualnoexcept

◆ getPreferredImageTypeForTemporaryImages()

std::unique_ptr< ImageType > juce::Direct2DGraphicsContext::getPreferredImageTypeForTemporaryImages ( ) const
inlineoverridevirtualinherited

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.

◆ handleShowWindow()

void juce::Direct2DHwndContext::handleShowWindow ( )

◆ isClipEmpty()

bool juce::Direct2DGraphicsContext::isClipEmpty ( ) const
overridevirtualinherited

◆ isVectorDevice()

bool juce::Direct2DGraphicsContext::isVectorDevice ( ) const
inlineoverridevirtualinherited

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

a printer.

Implements juce::LowLevelGraphicsContext.

◆ offsetShape() [1/3]

static Line< float > juce::Direct2DGraphicsContext::offsetShape ( Line< float a,
Point< float b 
)
staticprotectedinherited

◆ offsetShape() [2/3]

static Rectangle< float > juce::Direct2DGraphicsContext::offsetShape ( Rectangle< float a,
Point< float b 
)
staticprotectedinherited

◆ offsetShape() [3/3]

static RectangleList< float > juce::Direct2DGraphicsContext::offsetShape ( RectangleList< float a,
Point< float b 
)
staticprotectedinherited

◆ paintPrimitive()

template<typename Shape , typename Fn >
void juce::Direct2DGraphicsContext::paintPrimitive ( const Shape &  shape,
Fn &&  primitiveOp 
)
protectedinherited

◆ resetPendingClipList()

void juce::Direct2DGraphicsContext::resetPendingClipList ( )
protectedinherited

◆ restoreState()

void juce::Direct2DGraphicsContext::restoreState ( )
overridevirtualinherited

◆ saveState()

void juce::Direct2DGraphicsContext::saveState ( )
overridevirtualinherited

◆ setFill()

void juce::Direct2DGraphicsContext::setFill ( const FillType )
overridevirtualinherited

◆ setFont()

void juce::Direct2DGraphicsContext::setFont ( const Font )
overridevirtualinherited

◆ setInterpolationQuality()

void juce::Direct2DGraphicsContext::setInterpolationQuality ( Graphics::ResamplingQuality  )
overridevirtualinherited

◆ setOpacity()

void juce::Direct2DGraphicsContext::setOpacity ( float  )
overridevirtualinherited

◆ setOrigin()

void juce::Direct2DGraphicsContext::setOrigin ( Point< int >  )
overridevirtualinherited

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.

◆ startFrame()

bool juce::Direct2DGraphicsContext::startFrame ( float  dpiScale)
inherited

◆ strokePath()

void juce::Direct2DGraphicsContext::strokePath ( const Path ,
const PathStrokeType strokeType,
const AffineTransform  
)
overridevirtualinherited

Reimplemented from juce::LowLevelGraphicsContext.

Member Data Documentation

◆ currentState

SavedState* juce::Direct2DGraphicsContext::currentState = nullptr
protectedinherited

◆ frame

uint64_t juce::Direct2DGraphicsContext::frame = 0
protectedinherited

◆ metrics

Direct2DMetrics::Ptr juce::Direct2DGraphicsContext::metrics
inherited

◆ pendingClipList

PendingClipList juce::Direct2DGraphicsContext::pendingClipList
protectedinherited

◆ pimpl

std::unique_ptr<HwndPimpl> juce::Direct2DHwndContext::pimpl
private

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