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_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
26namespace juce
27{
28
29//==============================================================================
37{
38public:
39 //==============================================================================
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
85protected:
86 //==============================================================================
87 OutputStream& out;
88 int totalWidth, totalHeight;
89 bool needToClip;
90 Colour lastColour;
91
94 {
95 SavedState();
96 SavedState (const SavedState&) = default;
97 SavedState& operator= (const SavedState&) = delete;
98
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
115};
116
117} // namespace juce
Represents a 2D affine-transformation matrix.
Represents a colour, also including a transparency value.
Definition juce_Colour.h:38
Represents a colour or fill pattern to use for rendering paths.
Represents a particular font, including its size, style, etc.
Definition juce_Font.h:42
ResamplingQuality
Types of rendering quality that can be specified when drawing images.
Holds a fixed-size bitmap.
Definition juce_Image.h:58
Represents a line.
Definition juce_Line.h:47
Interface class for graphics context objects, used internally by the Graphics class.
An implementation of LowLevelGraphicsContext that turns the drawing operations into a PostScript docu...
The base class for streams that write data to some kind of destination.
An array designed for holding objects.
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
A pair of (x, y) coordinates.
Definition juce_Point.h:42
Maintains a set of rectangles as a complex region.
Manages a rectangle and allows geometric operations to be performed on it.
The JUCE String class!
Definition juce_String.h:53
#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 ...
JUCE Namespace.