LMMS
Loading...
Searching...
No Matches
juce_win32_Direct2DGraphicsContext.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#ifndef _WINDEF_
30class HWND__; // Forward or never
31typedef HWND__* HWND;
32#endif
33
35{
36public:
39
40 //==============================================================================
41 bool isVectorDevice() const override { return false; }
42
43 void setOrigin (Point<int>) override;
44 void addTransform (const AffineTransform&) override;
45 float getPhysicalPixelScaleFactor() override;
46 bool clipToRectangle (const Rectangle<int>&) override;
47 bool clipToRectangleList (const RectangleList<int>&) override;
48 void excludeClipRectangle (const Rectangle<int>&) override;
49 void clipToPath (const Path&, const AffineTransform&) override;
50 void clipToImageAlpha (const Image&, const AffineTransform&) override;
51 bool clipRegionIntersects (const Rectangle<int>&) override;
52 Rectangle<int> getClipBounds() const override;
53 bool isClipEmpty() const override;
54
55 //==============================================================================
56 void saveState() override;
57 void restoreState() override;
58 void beginTransparencyLayer (float opacity) override;
59 void endTransparencyLayer() override;
60
61 //==============================================================================
62 void setFill (const FillType&) override;
63 void setOpacity (float) override;
64 void setInterpolationQuality (Graphics::ResamplingQuality) override;
65
66 //==============================================================================
67 void fillRect (const Rectangle<int>&, bool replaceExistingContents) override;
68 void fillRect (const Rectangle<float>&) override;
69 void fillRectList (const RectangleList<float>&) override;
70 void fillPath (const Path&, const AffineTransform&) override;
71 void drawImage (const Image& sourceImage, const AffineTransform&) override;
72
73 //==============================================================================
74 void drawLine (const Line<float>&) override;
75 void setFont (const Font&) override;
76 const Font& getFont() override;
77 void drawGlyph (int glyphNumber, const AffineTransform&) override;
78 bool drawTextLayout (const AttributedString&, const Rectangle<float>&) override;
79
80 void resized();
81 void clear();
82
83 void start();
84 void end();
85
86 //==============================================================================
87private:
88 struct SavedState;
89
91
94
96
97 struct Pimpl;
98 std::unique_ptr<Pimpl> pimpl;
99
101};
102
103} // namespace juce
static void drawLine(const Point< T > &posStart, const Point< T > &posEnd)
Definition OpenGL.cpp:79
Definition juce_AffineTransform.h:43
Definition juce_AttributedString.h:47
bool isVectorDevice() const override
Definition juce_win32_Direct2DGraphicsContext.h:41
Rectangle< int > bounds
Definition juce_win32_Direct2DGraphicsContext.h:95
Direct2DLowLevelGraphicsContext(HWND)
Definition juce_win32_Direct2DGraphicsContext.cpp:519
HWND hwnd
Definition juce_win32_Direct2DGraphicsContext.h:90
std::unique_ptr< Pimpl > pimpl
Definition juce_win32_Direct2DGraphicsContext.h:98
OwnedArray< SavedState > states
Definition juce_win32_Direct2DGraphicsContext.h:93
SavedState * currentState
Definition juce_win32_Direct2DGraphicsContext.h:92
Definition juce_FillType.h:41
Definition juce_Font.h:42
ResamplingQuality
Definition juce_GraphicsContext.h:462
Definition juce_Image.h:58
Definition juce_Line.h:47
Definition juce_OwnedArray.h:51
Definition juce_Path.h:65
Definition juce_Point.h:42
Definition juce_Rectangle.h:67
Definition juce_RectangleList.h:43
virtual ASIOError start()=0
#define JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(className)
Definition carla_juce.cpp:31
HWND__ * HWND
Definition juce_win32_Direct2DGraphicsContext.h:31
RangedDirectoryIterator end(const RangedDirectoryIterator &)
Definition juce_RangedDirectoryIterator.h:184
Definition swell-internal.h:819
Definition juce_win32_Direct2DGraphicsContext.cpp:111
Definition juce_win32_Direct2DGraphicsContext.cpp:151