JUCE-7.0.12-0-g4f43011b96
JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins
« « « Anklang Documentation
Loading...
Searching...
No Matches
juce_graphics
contexts
juce_LowLevelGraphicsContext.h
Go to the documentation of this file.
1
/*
2
==============================================================================
3
4
This file is part of the JUCE library.
5
Copyright (c) 2022 - Raw Material Software Limited
6
7
JUCE is an open source library subject to commercial or open-source
8
licensing.
9
10
By using JUCE, you agree to the terms of both the JUCE 7 End-User License
11
Agreement and JUCE Privacy Policy.
12
13
End User License Agreement: www.juce.com/juce-7-licence
14
Privacy Policy: www.juce.com/juce-privacy-policy
15
16
Or: You may also use this code under the terms of the GPL v3 (see
17
www.gnu.org/licenses).
18
19
JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
20
EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
21
DISCLAIMED.
22
23
==============================================================================
24
*/
25
26
namespace
juce
27
{
28
29
//==============================================================================
45
class
JUCE_API
LowLevelGraphicsContext
46
{
47
protected
:
48
//==============================================================================
49
LowLevelGraphicsContext
() =
default
;
50
51
public
:
52
virtual
~LowLevelGraphicsContext
() =
default
;
53
55
virtual
bool
isVectorDevice
()
const
= 0;
56
57
//==============================================================================
63
virtual
void
setOrigin
(
Point<int>
) = 0;
64
virtual
void
addTransform (
const
AffineTransform
&) = 0;
65
virtual
float
getPhysicalPixelScaleFactor() = 0;
66
67
virtual
bool
clipToRectangle (
const
Rectangle<int>
&) = 0;
68
virtual
bool
clipToRectangleList (
const
RectangleList<int>
&) = 0;
69
virtual
void
excludeClipRectangle (
const
Rectangle<int>
&) = 0;
70
virtual
void
clipToPath (
const
Path
&,
const
AffineTransform
&) = 0;
71
virtual
void
clipToImageAlpha (
const
Image
&,
const
AffineTransform
&) = 0;
72
73
virtual
bool
clipRegionIntersects (
const
Rectangle<int>
&) = 0;
74
virtual
Rectangle<int>
getClipBounds()
const
= 0;
75
virtual
bool
isClipEmpty()
const
= 0;
76
77
virtual
void
saveState() = 0;
78
virtual
void
restoreState() = 0;
79
80
virtual
void
beginTransparencyLayer (
float
opacity) = 0;
81
virtual
void
endTransparencyLayer() = 0;
82
83
//==============================================================================
84
virtual
void
setFill (
const
FillType
&) = 0;
85
virtual
void
setOpacity (
float
) = 0;
86
virtual
void
setInterpolationQuality (
Graphics::ResamplingQuality
) = 0;
87
88
//==============================================================================
89
virtual
void
fillAll() { fillRect (getClipBounds(),
false
); }
90
virtual
void
fillRect (
const
Rectangle<int>
&,
bool
replaceExistingContents) = 0;
91
virtual
void
fillRect (
const
Rectangle<float>
&) = 0;
92
virtual
void
fillRectList (
const
RectangleList<float>
&) = 0;
93
virtual
void
fillPath (
const
Path
&,
const
AffineTransform
&) = 0;
94
virtual
void
drawImage (
const
Image
&,
const
AffineTransform
&) = 0;
95
virtual
void
drawLine (
const
Line<float>
&) = 0;
96
97
virtual
void
setFont (
const
Font
&) = 0;
98
virtual
const
Font
& getFont() = 0;
99
virtual
void
drawGlyph (
int
glyphNumber,
const
AffineTransform
&) = 0;
100
virtual
bool
drawTextLayout (
const
AttributedString
&,
const
Rectangle<float>
&) {
return
false
; }
101
};
102
103
}
// namespace juce
juce::AffineTransform
Represents a 2D affine-transformation matrix.
Definition
juce_AffineTransform.h:43
juce::AttributedString
A text string with a set of colour/font settings that are associated with sub-ranges of the text.
Definition
juce_AttributedString.h:47
juce::FillType
Represents a colour or fill pattern to use for rendering paths.
Definition
juce_FillType.h:41
juce::Font
Represents a particular font, including its size, style, etc.
Definition
juce_Font.h:42
juce::Graphics::ResamplingQuality
ResamplingQuality
Types of rendering quality that can be specified when drawing images.
Definition
juce_GraphicsContext.h:462
juce::Image
Holds a fixed-size bitmap.
Definition
juce_Image.h:58
juce::Line
Represents a line.
Definition
juce_Line.h:47
juce::LowLevelGraphicsContext
Interface class for graphics context objects, used internally by the Graphics class.
Definition
juce_LowLevelGraphicsContext.h:46
juce::LowLevelGraphicsContext::isVectorDevice
virtual bool isVectorDevice() const =0
Returns true if this device is vector-based, e.g.
juce::LowLevelGraphicsContext::setOrigin
virtual void setOrigin(Point< int >)=0
Moves the origin to a new position.
juce::Path
A path is a sequence of lines and curves that may either form a closed shape or be open-ended.
Definition
juce_Path.h:65
juce::Point
A pair of (x, y) coordinates.
Definition
juce_Point.h:42
juce::RectangleList
Maintains a set of rectangles as a complex region.
Definition
juce_RectangleList.h:43
juce::Rectangle
Manages a rectangle and allows geometric operations to be performed on it.
Definition
juce_Rectangle.h:67
juce
JUCE Namespace.
Definition
juce_AudioPlayHead.cpp:24
« « « Anklang Documentation