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_LowLevelGraphicsPostScriptRenderer.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
//==============================================================================
36
class
JUCE_API
LowLevelGraphicsPostScriptRenderer
:
public
LowLevelGraphicsContext
37
{
38
public
:
39
//==============================================================================
40
LowLevelGraphicsPostScriptRenderer
(
OutputStream
& resultingPostScript,
41
const
String
& documentTitle,
42
int
totalWidth,
43
int
totalHeight);
44
45
//==============================================================================
46
bool
isVectorDevice()
const override
;
47
void
setOrigin (
Point<int>
)
override
;
48
void
addTransform (
const
AffineTransform
&)
override
;
49
float
getPhysicalPixelScaleFactor()
override
;
50
51
bool
clipToRectangle (
const
Rectangle<int>
&)
override
;
52
bool
clipToRectangleList (
const
RectangleList<int>
&)
override
;
53
void
excludeClipRectangle (
const
Rectangle<int>
&)
override
;
54
void
clipToPath (
const
Path
&,
const
AffineTransform
&)
override
;
55
void
clipToImageAlpha (
const
Image
&,
const
AffineTransform
&)
override
;
56
57
void
saveState()
override
;
58
void
restoreState()
override
;
59
60
void
beginTransparencyLayer (
float
)
override
;
61
void
endTransparencyLayer()
override
;
62
63
bool
clipRegionIntersects (
const
Rectangle<int>
&)
override
;
64
Rectangle<int>
getClipBounds()
const override
;
65
bool
isClipEmpty()
const override
;
66
67
//==============================================================================
68
void
setFill (
const
FillType
&)
override
;
69
void
setOpacity (
float
)
override
;
70
void
setInterpolationQuality (
Graphics::ResamplingQuality
)
override
;
71
72
//==============================================================================
73
void
fillRect (
const
Rectangle<int>
&,
bool
replaceExistingContents)
override
;
74
void
fillRect (
const
Rectangle<float>
&)
override
;
75
void
fillRectList (
const
RectangleList<float>
&)
override
;
76
void
fillPath (
const
Path
&,
const
AffineTransform
&)
override
;
77
void
drawImage (
const
Image
&,
const
AffineTransform
&)
override
;
78
void
drawLine (
const
Line<float>
&)
override
;
79
80
//==============================================================================
81
const
Font
& getFont()
override
;
82
void
setFont (
const
Font
&)
override
;
83
void
drawGlyph (
int
glyphNumber,
const
AffineTransform
&)
override
;
84
85
protected
:
86
//==============================================================================
87
OutputStream
& out;
88
int
totalWidth, totalHeight;
89
bool
needToClip;
90
Colour
lastColour;
91
93
struct
SavedState
94
{
95
SavedState
();
96
SavedState
(
const
SavedState
&) =
default
;
97
SavedState
& operator= (
const
SavedState
&) =
delete
;
98
99
RectangleList<int>
clip;
100
int
xOffset, yOffset;
101
FillType
fillType;
102
Font
font;
103
};
104
105
OwnedArray<SavedState>
stateStack;
106
107
void
writeClip();
108
void
writeColour (
Colour
colour);
109
void
writePath (
const
Path
&)
const
;
110
void
writeXY (
float
x,
float
y)
const
;
111
void
writeTransform (
const
AffineTransform
&)
const
;
112
void
writeImage (
const
Image
&,
int
sx,
int
sy,
int
maxW,
int
maxH)
const
;
113
114
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR
(
LowLevelGraphicsPostScriptRenderer
)
115
};
116
117
}
// namespace juce
juce::AffineTransform
Represents a 2D affine-transformation matrix.
Definition
juce_AffineTransform.h:43
juce::Colour
Represents a colour, also including a transparency value.
Definition
juce_Colour.h:38
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::LowLevelGraphicsPostScriptRenderer
An implementation of LowLevelGraphicsContext that turns the drawing operations into a PostScript docu...
Definition
juce_LowLevelGraphicsPostScriptRenderer.h:37
juce::OutputStream
The base class for streams that write data to some kind of destination.
Definition
juce_OutputStream.h:38
juce::OwnedArray
An array designed for holding objects.
Definition
juce_OwnedArray.h:50
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::String
The JUCE String class!
Definition
juce_String.h:53
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
This is a shorthand way of writing both a JUCE_DECLARE_NON_COPYABLE and JUCE_LEAK_DETECTOR macro for ...
Definition
juce_PlatformDefs.h:242
juce
JUCE Namespace.
Definition
juce_AudioPlayHead.cpp:24
juce::LowLevelGraphicsPostScriptRenderer::SavedState
Describes a saved state.
Definition
juce_LowLevelGraphicsPostScriptRenderer.h:94
« « « Anklang Documentation