neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
graphics_context.hpp
Go to the documentation of this file.
1// graphics_context.hpp
2/*
3 neogfx C++ App/Game Engine
4 Copyright (c) 2015, 2020 Leigh Johnston. All Rights Reserved.
5
6 This program is free software: you can redistribute it and / or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#pragma once
21
22#include <neogfx/neogfx.hpp>
24
25namespace neogfx
26{
28 {
29 public:
30 struct not_implemented : std::logic_error { not_implemented() : std::logic_error("neogfx::graphics_context::not_implemented") {} };
31 private:
32 friend class generic_surface;
33 // exceptions
34 // construction
35 public:
36 graphics_context(const i_surface& aSurface, type aType = type::Attached);
37 graphics_context(const i_surface& aSurface, const font& aDefaultFont, type aType = type::Attached);
38 graphics_context(const i_widget& aWidget, type aType = type::Attached);
39 graphics_context(const i_texture& aTexture, type aType = type::Attached);
42 // i_rendering_context
43 public:
44 std::unique_ptr<i_rendering_context> clone() const final;
45 public:
47 const i_render_target& render_target() const final;
48 rect rendering_area(bool aConsiderScissor = true) const final;
49 const graphics_operation::queue& queue() const final;
50 graphics_operation::queue& queue() final;
51 void enqueue(const graphics_operation::operation& aOperation) final;
52 void flush() final;
53 public:
55 vec2 offset() const final;
56 void set_offset(const optional_vec2& aOffset) final;
57 bool gradient_set() const final;
58 void apply_gradient(i_gradient_shader& aShader) final;
59 // i_graphics_context
60 public:
61 delta to_device_units(const delta& aValue) const final;
62 size to_device_units(const size& aValue) const final;
63 point to_device_units(const point& aValue) const final;
64 vec2 to_device_units(const vec2& aValue) const final;
65 rect to_device_units(const rect& aValue) const final;
66 path to_device_units(const path& aValue) const final;
67 delta from_device_units(const delta& aValue) const final;
68 size from_device_units(const size& aValue) const final;
69 point from_device_units(const point& aValue) const final;
70 rect from_device_units(const rect& aValue) const final;
71 path from_device_units(const path& aValue) const final;
72 layer_t layer() const final;
73 void set_layer(layer_t aLayer) final;
76 void set_logical_coordinates(const neogfx::logical_coordinates& aCoordinates) const final;
77 font const& default_font() const final;
78 void set_default_font(const font& aDefaultFont) const final;
79 void set_extents(const size& aExtents) const final;
80 void set_origin(const point& aOrigin) const final;
81 point origin() const final;
82 void flush() const final;
83 void set_default_viewport() const final;
84 void set_viewport(const rect& aViewportRect) const final;
85 void scissor_on(const rect& aRect) const final;
86 void scissor_off() const final;
87 bool snap_to_pixel() const final;
88 void set_snap_to_pixel(bool aSnap) const final;
89 double opacity() const final;
90 void set_opacity(double aOpacity) const final;
92 void set_blending_mode(neogfx::blending_mode aBlendingMode) const final;
94 void set_smoothing_mode(neogfx::smoothing_mode aSmoothingMode) const final;
95 void push_logical_operation(logical_operation aLogicalOperation) const final;
96 void pop_logical_operation() const final;
97 void line_stipple_on(scalar aFactor, uint16_t aPattern, scalar aPosition = 0.0) const final;
98 void line_stipple_off() const final;
99 bool is_subpixel_rendering_on() const final;
100 void subpixel_rendering_on() const final;
101 void subpixel_rendering_off() const final;
102 void clear(const color& aColor, const std::optional<scalar>& aZpos = std::optional<scalar>{}) const final;
103 void clear_depth_buffer() const final;
104 void clear_stencil_buffer() const final;
105 void blit(const rect& aDestinationRect, const i_graphics_context& aSource, const rect& aSourceRect) const final;
106 void blur(const rect& aDestinationRect, const i_graphics_context& aSource, const rect& aSourceRect, dimension aRadius, blurring_algorithm aAlgorithm = blurring_algorithm::Gaussian, scalar aParameter1 = 5, scalar aParameter2 = 1.0) const final;
107 void clear_gradient() final;
108 void set_gradient(const gradient& aGradient, const rect& aBoundingBox) final;
109 void set_pixel(const point& aPoint, const color& aColor) const final;
110 void draw_pixel(const point& aPoint, const color& aColor) const final;
111 void draw_line(const point& aFrom, const point& aTo, const pen& aPen) const final;
112 void draw_triangle(const point& aP0, const point& aP1, const point& aP2, const pen& aPen, const brush& aFill = brush{}) const final;
113 void draw_rect(const rect& aRect, const pen& aPen, const brush& aFill = brush{}) const final;
114 void draw_rounded_rect(const rect& aRect, const vec4& aRadius, const pen& aPen, const brush& aFill = brush{}) const final;
115 void draw_checker_rect(const rect& aRect, const size& aSquareSize, const pen& aPen, const brush& aFill1, const brush& aFill2) const final;
116 void draw_circle(const point& aCenter, dimension aRadius, const pen& aPen, const brush& aFill = brush{}) const final;
117 void draw_ellipse(const point& aCenter, dimension aRadiusA, dimension aRadiusB, const pen& aPen, const brush& aFill = brush{}) const final;
118 void draw_pie(const point& aCenter, dimension aRadius, angle aStartAngle, angle aEndAngle, const pen& aPen, const brush& aFill = brush{}) const final;
119 void draw_arc(const point& aCenter, dimension aRadius, angle aStartAngle, angle aEndAngle, const pen& aPen, const brush& aFill = brush{}) const final;
120 void draw_cubic_bezier(const point& aP0, const point& aP1, const point& aP2, const point& aP3, const pen& aPen) const final;
121 void draw_path(const path& aPath, const pen& aPen, const brush& aFill = brush{}) const final;
122 void draw_shape(const game::mesh& aShape, const vec3& aPosition, const pen& aPen, const brush& aFill = brush{}) const final;
123 void draw_entities(game::i_ecs& aEcs, int32_t aLayer = 0) const final;
124 void draw_focus_rect(const rect& aRect) const final;
125 bool has_tab_stops() const override;
126 i_tab_stops const& tab_stops() const override;
127 void set_tab_stops(i_tab_stops const& aTabStops) override;
128 void clear_tab_stops() override;
129 size text_extent(std::string const& aText) const final;
130 size text_extent(std::string const& aText, const font& aFont) const final;
131 size text_extent(std::string const& aText, std::function<font(std::size_t)> aFontSelector) const final;
132 size text_extent(std::string::const_iterator aTextBegin, std::string::const_iterator aTextEnd) const final;
133 size text_extent(std::string::const_iterator aTextBegin, std::string::const_iterator aTextEnd, const font& aFont) const final;
134 size text_extent(std::string::const_iterator aTextBegin, std::string::const_iterator aTextEnd, std::function<font(std::size_t)> aFontSelector) const final;
135 size multiline_text_extent(std::string const& aText) const final;
136 size multiline_text_extent(std::string const& aText, const font& aFont) const final;
137 size multiline_text_extent(std::string const& aText, std::function<font(std::size_t)> aFontSelector) const final;
138 size multiline_text_extent(std::string const& aText, dimension aMaxWidth) const final;
139 size multiline_text_extent(std::string const& aText, const font& aFont, dimension aMaxWidth) const final;
140 size multiline_text_extent(std::string const& aText, std::function<font(std::size_t)> aFontSelector, dimension aMaxWidth) const final;
141 size glyph_text_extent(const glyph_text& aText) const final;
142 size glyph_text_extent(const glyph_text& aText, glyph_text::const_iterator aTextBegin, glyph_text::const_iterator aTextEnd) const final;
143 size multiline_glyph_text_extent(const glyph_text& aText, dimension aMaxWidth) const final;
144 glyph_text to_glyph_text(std::string const& aText) const final;
145 glyph_text to_glyph_text(std::string const& aText, const font& aFont) const final;
146 glyph_text to_glyph_text(std::string const& aText, std::function<font(std::size_t)> aFontSelector) const final;
147 glyph_text to_glyph_text(std::string::const_iterator aTextBegin, std::string::const_iterator aTextEnd) const final;
148 glyph_text to_glyph_text(std::string::const_iterator aTextBegin, std::string::const_iterator aTextEnd, const font& aFont) const final;
149 glyph_text to_glyph_text(std::string::const_iterator aTextBegin, std::string::const_iterator aTextEnd, std::function<font(std::size_t)> aFontSelector) const final;
150 glyph_text to_glyph_text(const std::u32string& aText) const final;
151 glyph_text to_glyph_text(const std::u32string& aText, const font& aFont) const final;
152 glyph_text to_glyph_text(const std::u32string& aText, std::function<font(std::size_t)> aFontSelector) const final;
153 glyph_text to_glyph_text(std::u32string::const_iterator aTextBegin, std::u32string::const_iterator aTextEnd) const final;
154 glyph_text to_glyph_text(std::u32string::const_iterator aTextBegin, std::u32string::const_iterator aTextEnd, const font& aFont) const final;
155 glyph_text to_glyph_text(std::u32string::const_iterator aTextBegin, std::u32string::const_iterator aTextEnd, std::function<font(std::size_t)> aFontSelector) const final;
156 multiline_glyph_text to_multiline_glyph_text(std::string const& aText, dimension aMaxWidth, alignment aAlignment = alignment::Left) const final;
157 multiline_glyph_text to_multiline_glyph_text(std::string const& aText, const font& aFont, dimension aMaxWidth, alignment aAlignment = alignment::Left) const final;
158 multiline_glyph_text to_multiline_glyph_text(std::string::const_iterator aTextBegin, std::string::const_iterator aTextEnd, dimension aMaxWidth, alignment aAlignment = alignment::Left) const final;
159 multiline_glyph_text to_multiline_glyph_text(std::string::const_iterator aTextBegin, std::string::const_iterator aTextEnd, const font& aFont, dimension aMaxWidth, alignment aAlignment = alignment::Left) const final;
160 multiline_glyph_text to_multiline_glyph_text(std::string::const_iterator aTextBegin, std::string::const_iterator aTextEnd, std::function<font(std::size_t)> aFontSelector, dimension aMaxWidth, alignment aAlignment = alignment::Left) const final;
161 multiline_glyph_text to_multiline_glyph_text(const std::u32string& aText, dimension aMaxWidth, alignment aAlignment = alignment::Left) const final;
162 multiline_glyph_text to_multiline_glyph_text(const std::u32string& aText, const font& aFont, dimension aMaxWidth, alignment aAlignment = alignment::Left) const final;
163 multiline_glyph_text to_multiline_glyph_text(std::u32string::const_iterator aTextBegin, std::u32string::const_iterator aTextEnd, dimension aMaxWidth, alignment aAlignment = alignment::Left) const final;
164 multiline_glyph_text to_multiline_glyph_text(std::u32string::const_iterator aTextBegin, std::u32string::const_iterator aTextEnd, const font& aFont, dimension aMaxWidth, alignment aAlignment = alignment::Left) const final;
165 multiline_glyph_text to_multiline_glyph_text(std::u32string::const_iterator aTextBegin, std::u32string::const_iterator aTextEnd, std::function<font(std::size_t)> aFontSelector, dimension aMaxWidth, alignment aAlignment = alignment::Left) const final;
166 multiline_glyph_text to_multiline_glyph_text(const glyph_text& aText, dimension aMaxWidth, alignment aAlignment = alignment::Left) const final;
167 bool is_text_left_to_right(std::string const& aText) const final;
168 bool is_text_left_to_right(std::string const& aText, const font& aFont) const final;
169 bool is_text_right_to_left(std::string const& aText) const final;
170 bool is_text_right_to_left(std::string const& aText, const font& aFont) const final;
171 void draw_text(const point& aPoint, std::string const& aText, const text_format& aTextFormat) const final;
172 void draw_text(const point& aPoint, std::string const& aText, const font& aFont, const text_format& aTextFormat) const final;
173 void draw_text(const point& aPoint, std::string::const_iterator aTextBegin, std::string::const_iterator aTextEnd, const text_format& aTextFormat) const final;
174 void draw_text(const point& aPoint, std::string::const_iterator aTextBegin, std::string::const_iterator aTextEnd, const font& aFont, const text_format& aTextFormat) const final;
175 void draw_text(const vec3& aPoint, std::string const& aText, const text_format& aTextFormat) const final;
176 void draw_text(const vec3& aPoint, std::string const& aText, const font& aFont, const text_format& aTextFormat) const final;
177 void draw_text(const vec3& aPoint, std::string::const_iterator aTextBegin, std::string::const_iterator aTextEnd, const text_format& aTextFormat) const final;
178 void draw_text(const vec3& aPoint, std::string::const_iterator aTextBegin, std::string::const_iterator aTextEnd, const font& aFont, const text_format& aTextFormat) const final;
179 void draw_multiline_text(const point& aPoint, std::string const& aText, const text_format& aTextFormat, alignment aAlignment = alignment::Left) const final;
180 void draw_multiline_text(const point& aPoint, std::string const& aText, const font& aFont, const text_format& aTextFormat, alignment aAlignment = alignment::Left) const final;
181 void draw_multiline_text(const point& aPoint, std::string const& aText, dimension aMaxWidth, const text_format& aTextFormat, alignment aAlignment = alignment::Left) const final;
182 void draw_multiline_text(const point& aPoint, std::string const& aText, const font& aFont, dimension aMaxWidth, const text_format& aTextFormat, alignment aAlignment = alignment::Left) const final;
183 void draw_multiline_text(const vec3& aPoint, std::string const& aText, const text_format& aTextFormat, alignment aAlignment = alignment::Left) const final;
184 void draw_multiline_text(const vec3& aPoint, std::string const& aText, const font& aFont, const text_format& aTextFormat, alignment aAlignment = alignment::Left) const final;
185 void draw_multiline_text(const vec3& aPoint, std::string const& aText, dimension aMaxWidth, const text_format& aTextFormat, alignment aAlignment = alignment::Left) const final;
186 void draw_multiline_text(const vec3& aPoint, std::string const& aText, const font& aFont, dimension aMaxWidth, const text_format& aTextFormat, alignment aAlignment = alignment::Left) const final;
187 void draw_glyph_text(const point& aPoint, const glyph_text& aText, const text_format& aTextFormat) const final;
188 void draw_glyph_text(const point& aPoint, const glyph_text& aText, glyph_text::const_iterator aTextBegin, glyph_text::const_iterator aTextEnd, const text_format& aTextFormat) const final;
189 void draw_glyph_text(const vec3& aPoint, const glyph_text& aText, const text_format& aTextFormat) const final;
190 void draw_glyph_text(const vec3& aPoint, const glyph_text& aText, glyph_text::const_iterator aTextBegin, glyph_text::const_iterator aTextEnd, const text_format& aTextFormat) const final;
191 void draw_multiline_glyph_text(const point& aPoint, const glyph_text& aText, dimension aMaxWidth, const text_format& aTextFormat, alignment aAlignment = alignment::Left) const final;
192 void draw_multiline_glyph_text(const vec3& aPoint, const glyph_text& aText, dimension aMaxWidth, const text_format& aTextFormat, alignment aAlignment = alignment::Left) const final;
193 void draw_multiline_glyph_text(const point& aPoint, const multiline_glyph_text& aText, const text_format& aTextFormat) const final;
194 void draw_multiline_glyph_text(const vec3& aPoint, const multiline_glyph_text& aText, const text_format& aTextFormat) const final;
195 void draw_glyph(const point& aPoint, const glyph_text& aText, const glyph_char& aGlyphChar, const text_format& aTextFormat) const final;
196 void draw_glyph(const vec3& aPoint, const glyph_text& aText, const glyph_char& aGlyphChar, const text_format& aTextFormat) const final;
197 void draw_glyphs(const point& aPoint, const glyph_text& aText, const text_format_spans& aSpans) const final;
198 void draw_glyphs(const vec3& aPoint, const glyph_text& aText, const text_format_spans& aSpans) const final;
199 char mnemonic() const final;
200 bool mnemonic_set() const final;
201 void set_mnemonic(bool aShowMnemonics, char aMnemonicPrefix = '&') const final;
202 void unset_mnemonic() const final;
203 bool mnemonics_shown() const final;
204 bool password() const final;
205 std::string const& password_mask() const final;
206 void set_password(bool aPassword, std::string const& aMask = "\xE2\x97\x8F") final;
207 void draw_texture(const point& aPoint, const i_texture& aTexture, const color_or_gradient& aColor = {}, shader_effect aShaderEffect = shader_effect::None) const final;
208 void draw_texture(const rect& aRect, const i_texture& aTexture, const color_or_gradient& aColor = {}, shader_effect aShaderEffect = shader_effect::None) const final;
209 void draw_texture(const point& aPoint, const i_texture& aTexture, const rect& aTextureRect, const color_or_gradient& aColor = {}, shader_effect aShaderEffect = shader_effect::None) const final;
210 void draw_texture(const rect& aRect, const i_texture& aTexture, const rect& aTextureRect, const color_or_gradient& aColor = {}, shader_effect aShaderEffect = shader_effect::None) const final;
211 void draw_texture(const game::mesh& aMesh, const i_texture& aTexture, const color_or_gradient& aColor = {}, shader_effect aShaderEffect = shader_effect::None) const final;
212 void draw_texture(const game::mesh& aMesh, const i_texture& aTexture, const rect& aTextureRect, const color_or_gradient& aColor = {}, shader_effect aShaderEffect = shader_effect::None) const final;
213 void draw_mesh(const game::mesh& aMesh, const game::material& aMaterial, const optional_mat44& aTransformation = optional_mat44{}, const std::optional<game::filter>& aFilter = {}) const final;
214
215 // implementation
216 // from i_rendering_context
217 public:
219 // from i_device_metrics
220 public:
221 bool metrics_available() const final;
222 size extents() const final;
224 dimension vertical_dpi() const final;
225 dimension ppi() const final;
226 dimension em_size() const final;
227 // from i_units_context
228 public:
229 bool device_metrics_available() const final;
230 const i_device_metrics& device_metrics() const final;
231 protected:
232 bool attached() const;
233 bool active() const;
235 // helpers
236 // attributes
237 private:
238 type iType;
239 const i_render_target& iRenderTarget;
240 mutable std::optional<scoped_render_target> iSrt;
241 mutable std::unique_ptr<i_rendering_context> iNativeGraphicsContext;
242 mutable font iDefaultFont;
243 mutable point iOrigin;
244 mutable size iExtents;
245 mutable int32_t iLayer;
246 mutable std::optional<neogfx::logical_coordinate_system> iLogicalCoordinateSystem;
247 mutable std::optional<neogfx::logical_coordinates> iLogicalCoordinates;
248 mutable bool iSnapToPixel;
249 mutable double iOpacity;
250 mutable neogfx::blending_mode iBlendingMode;
251 mutable neogfx::smoothing_mode iSmoothingMode;
252 mutable bool iSubpixelRendering;
253 mutable std::optional<neogfx::tab_stops> iTabStops;
254 mutable std::optional<std::pair<bool, char>> iMnemonic;
255 mutable std::optional<std::string> iPassword;
256 mutable std::optional<size> iPreviousPingPongBufferSize;
257 };
258}
void clear_stencil_buffer() const final
void set_origin(const point &aOrigin) const final
void scissor_on(const rect &aRect) const final
multiline_glyph_text to_multiline_glyph_text(std::string const &aText, dimension aMaxWidth, alignment aAlignment=alignment::Left) const final
font const & default_font() const final
point origin() const final
void set_opacity(double aOpacity) const final
void draw_rect(const rect &aRect, const pen &aPen, const brush &aFill=brush{}) const final
void clear_gradient() final
void draw_mesh(const game::mesh &aMesh, const game::material &aMaterial, const optional_mat44 &aTransformation=optional_mat44{}, const std::optional< game::filter > &aFilter={}) const final
graphics_context(const i_widget &aWidget, type aType=type::Attached)
graphics_context(const i_texture &aTexture, type aType=type::Attached)
void subpixel_rendering_on() const final
bool is_text_right_to_left(std::string const &aText) const final
void set_snap_to_pixel(bool aSnap) const final
void draw_multiline_text(const point &aPoint, std::string const &aText, const text_format &aTextFormat, alignment aAlignment=alignment::Left) const final
void enqueue(const graphics_operation::operation &aOperation) final
bool password() const final
const i_render_target & render_target() const final
i_rendering_context & native_context() const
void set_blending_mode(neogfx::blending_mode aBlendingMode) const final
void line_stipple_off() const final
void draw_glyphs(const point &aPoint, const glyph_text &aText, const text_format_spans &aSpans) const final
void clear(const color &aColor, const std::optional< scalar > &aZpos=std::optional< scalar >{}) const final
void draw_texture(const point &aPoint, const i_texture &aTexture, const color_or_gradient &aColor={}, shader_effect aShaderEffect=shader_effect::None) const final
void set_pixel(const point &aPoint, const color &aColor) const final
void draw_glyph(const point &aPoint, const glyph_text &aText, const glyph_char &aGlyphChar, const text_format &aTextFormat) const final
double opacity() const final
char mnemonic() const final
void apply_gradient(i_gradient_shader &aShader) final
void draw_arc(const point &aCenter, dimension aRadius, angle aStartAngle, angle aEndAngle, const pen &aPen, const brush &aFill=brush{}) const final
void subpixel_rendering_off() const final
void clear_tab_stops() override
void scissor_off() const final
glyph_text to_glyph_text(std::string const &aText) const final
neogfx::subpixel_format subpixel_format() const final
void blur(const rect &aDestinationRect, const i_graphics_context &aSource, const rect &aSourceRect, dimension aRadius, blurring_algorithm aAlgorithm=blurring_algorithm::Gaussian, scalar aParameter1=5, scalar aParameter2=1.0) const final
void set_password(bool aPassword, std::string const &aMask="\xE2\x97\x8F") final
void draw_glyph_text(const point &aPoint, const glyph_text &aText, const text_format &aTextFormat) const final
void draw_multiline_glyph_text(const point &aPoint, const glyph_text &aText, dimension aMaxWidth, const text_format &aTextFormat, alignment aAlignment=alignment::Left) const final
void clear_depth_buffer() const final
void set_extents(const size &aExtents) const final
void set_default_font(const font &aDefaultFont) const final
dimension ppi() const final
bool is_subpixel_rendering_on() const final
size multiline_glyph_text_extent(const glyph_text &aText, dimension aMaxWidth) const final
i_rendering_engine & rendering_engine() const final
size extents() const final
std::string const & password_mask() const final
void unset_mnemonic() const final
dimension horizontal_dpi() const final
void draw_shape(const game::mesh &aShape, const vec3 &aPosition, const pen &aPen, const brush &aFill=brush{}) const final
void set_viewport(const rect &aViewportRect) const final
const i_device_metrics & device_metrics() const final
size text_extent(std::string const &aText) const final
dimension vertical_dpi() const final
graphics_context(const i_surface &aSurface, type aType=type::Attached)
void draw_focus_rect(const rect &aRect) const final
layer_t layer() const final
void draw_texture(const rect &aRect, const i_texture &aTexture, const color_or_gradient &aColor={}, shader_effect aShaderEffect=shader_effect::None) const final
void set_layer(layer_t aLayer) final
void set_default_viewport() const final
bool mnemonics_shown() const final
bool metrics_available() const final
void draw_circle(const point &aCenter, dimension aRadius, const pen &aPen, const brush &aFill=brush{}) const final
void set_logical_coordinates(const neogfx::logical_coordinates &aCoordinates) const final
void set_tab_stops(i_tab_stops const &aTabStops) override
void set_gradient(const gradient &aGradient, const rect &aBoundingBox) final
void blit(const rect &aDestinationRect, const i_graphics_context &aSource, const rect &aSourceRect) const final
void pop_logical_operation() const final
void draw_pixel(const point &aPoint, const color &aColor) const final
void draw_ellipse(const point &aCenter, dimension aRadiusA, dimension aRadiusB, const pen &aPen, const brush &aFill=brush{}) const final
dimension em_size() const final
void line_stipple_on(scalar aFactor, uint16_t aPattern, scalar aPosition=0.0) const final
void draw_texture(const rect &aRect, const i_texture &aTexture, const rect &aTextureRect, const color_or_gradient &aColor={}, shader_effect aShaderEffect=shader_effect::None) const final
delta from_device_units(const delta &aValue) const final
std::unique_ptr< i_rendering_context > clone() const final
void set_offset(const optional_vec2 &aOffset) final
bool device_metrics_available() const final
void draw_rounded_rect(const rect &aRect, const vec4 &aRadius, const pen &aPen, const brush &aFill=brush{}) const final
vec2 offset() const final
graphics_context(const i_surface &aSurface, const font &aDefaultFont, type aType=type::Attached)
bool gradient_set() const final
void push_logical_operation(logical_operation aLogicalOperation) const final
graphics_context(const graphics_context &aOther)
size glyph_text_extent(const glyph_text &aText) const final
bool mnemonic_set() const final
delta to_device_units(const delta &aValue) const final
bool has_tab_stops() const override
void draw_pie(const point &aCenter, dimension aRadius, angle aStartAngle, angle aEndAngle, const pen &aPen, const brush &aFill=brush{}) const final
bool is_text_left_to_right(std::string const &aText) const final
void draw_texture(const point &aPoint, const i_texture &aTexture, const rect &aTextureRect, const color_or_gradient &aColor={}, shader_effect aShaderEffect=shader_effect::None) const final
void draw_line(const point &aFrom, const point &aTo, const pen &aPen) const final
void draw_texture(const game::mesh &aMesh, const i_texture &aTexture, const color_or_gradient &aColor={}, shader_effect aShaderEffect=shader_effect::None) const final
void draw_entities(game::i_ecs &aEcs, int32_t aLayer=0) const final
void set_logical_coordinate_system(neogfx::logical_coordinate_system aSystem) const final
rect rendering_area(bool aConsiderScissor=true) const final
void draw_text(const point &aPoint, std::string const &aText, const text_format &aTextFormat) const final
void draw_triangle(const point &aP0, const point &aP1, const point &aP2, const pen &aPen, const brush &aFill=brush{}) const final
size multiline_text_extent(std::string const &aText) const final
void draw_texture(const game::mesh &aMesh, const i_texture &aTexture, const rect &aTextureRect, const color_or_gradient &aColor={}, shader_effect aShaderEffect=shader_effect::None) const final
bool snap_to_pixel() const final
void set_mnemonic(bool aShowMnemonics, char aMnemonicPrefix='&') const final
void draw_path(const path &aPath, const pen &aPen, const brush &aFill=brush{}) const final
void draw_checker_rect(const rect &aRect, const size &aSquareSize, const pen &aPen, const brush &aFill1, const brush &aFill2) const final
void draw_cubic_bezier(const point &aP0, const point &aP1, const point &aP2, const point &aP3, const pen &aPen) const final
void set_smoothing_mode(neogfx::smoothing_mode aSmoothingMode) const final
const graphics_operation::queue & queue() const final
blurring_algorithm
logical_coordinate_system
default_geometry_value_type dimension
logical_operation
subpixel_format
Definition i_display.hpp:33
double scalar
Definition numerical.hpp:63
Definition plf_hive.h:79