20 #ifndef FASTUIDRAW_PAINTER_SURFACE_HPP 21 #define FASTUIDRAW_PAINTER_SURFACE_HPP 25 #include <fastuidraw/util/rect.hpp> 171 viewport_coords *= 2.0f;
172 viewport_coords -=
vec2(1.0f);
173 return viewport_coords;
209 Rect *out_rect)
const;
240 return_value.
x() =
t_min(return_value.
x(), surface_dims.
x());
241 return_value.
y() =
t_min(return_value.
y(), surface_dims.
y());
void compute_clip_equations(ivec2 surface_dims, vecN< vec3, 4 > *out_clip_equations) const
render_type_t
Enumeration to specify the render target of a Surface.
all classes and functions of FastUIDraw are in the namespace fastuidraw.
PainterSurface represents an interface to specify a buffer to which a PainterBackend renders content...
A wrapper over a pointer to implement reference counting.
static vec2 compute_viewport_coordinates(vec2 ndc, ivec2 dims)
ivec2 visible_dimensions(void) const
vec2 compute_pixel_coordinates(vec2 ndc) const
vec2 compute_normalized_device_coords(vec2 pixel) const
ivec2 compute_visible_dimensions(void) const
ivec2 compute_visible_dimensions(ivec2 surface_dims) const
virtual reference_counted_ptr< const Image > image(ImageAtlas &atlas) const =0
vec2 compute_normalized_device_coords_from_viewport_coords(ivec2 viewport_coords) const
vec2 compute_viewport_coordinates(vec2 ndc) const
Viewport(int x, int y, int w, int h)
const T & t_min(const T &a, const T &b)
virtual const Viewport & viewport(void) const =0
static vec2 compute_viewport_coordinates(vec2 ndc, vec2 dims)
Defines default reference counting base classes.
vec2 compute_normalized_device_coords_from_viewport_coords(vec2 viewport_coords) const
An ImageAtlas is a common location to place images of an application.
virtual enum render_type_t render_type(void) const =0
virtual const vec4 & clear_color(void) const =0
void compute_normalized_clip_rect(ivec2 surface_dims, Rect *out_rect) const
virtual ivec2 dimensions(void) const =0
file reference_counted.hpp