81 void clear(
const Rect2& target,
const Color& color = Color::zero);
96 void draw(
const HTexture& texture,
const Rect2& rect,
const Color& tintColor = Color::white) {
133 double miterLimit = 10.0);
138 double miterLimit = 10.0);
A path that consists of straight and curved line segments that you can render.
Definition BezierPath.hpp:46
An object that encapsulates rendering context for a view.
Definition GraphicsCommandBuffer.hpp:284
An object that represents a graphics context.
Definition GraphicsContext.hpp:45
void stroke(BezierPath &&path, const Paint &paint, double lineWidth=1.0, Shape::BlendMode blendMode=Shape::BlendMode::Normal, Shape::LineCapStyle lineCapStyle=Shape::LineCapStyle::Butt, Shape::LineJoinStyle lineJoinStyle=Shape::LineJoinStyle::Miter, double miterLimit=10.0)
Draws a line along the path using the given stroke color and drawing attributes.
void fill(const BezierPath &path, const Paint &paint, Shape::BlendMode blendMode=Shape::BlendMode::Normal)
Paints the region enclosed by the path.
void fill(BezierPath &&path, const Paint &paint, Shape::BlendMode blendMode=Shape::BlendMode::Normal)
Paints the region enclosed by the path.
void draw(const HTexture &texture, const Rect2 &rect, const Color &tintColor=Color::white)
Renders an texture within the given graphics context.
Definition GraphicsContext.hpp:96
void setClipRect(const Rect2 &area)
Defines the area that will be clipped by subsequent draw calls.
GraphicsCommandBuffer & mCommandBuffer
The render context object.
Definition GraphicsContext.hpp:55
GraphicsContext * mParent
If this is a sub-view, points to the graphics context of the parent view.
Definition GraphicsContext.hpp:61
void draw(const TexturePtr &texture, const Rect2 &rect, const Color &tintColor=Color::white)
Renders an texture within the given graphics context.
void draw(RawGraphicsCommand::Command &&command)
Submits a custom command that will be run by the renderer before a new frame recording begins.
GraphicsContext(GraphicsCommandBuffer &commandBuffer, const AffineTransform &transform=AffineTransform())
GraphicsContext(GraphicsContext &parent, const AffineTransform &transform=AffineTransform())
void draw(Shape &&shape)
Draws a shape within the given graphics context.
void resetClipRect()
Resets the clip rect area.
void draw(TextLayoutManager &layoutManager, Vector2 offset=Vector2(0.0), const Color &tintColor=Color::white)
Draws a text within the given graphics context.
GraphicsState mState
A structure that contains the graphics state for the context.
Definition GraphicsContext.hpp:64
void draw(const Shape &shape)
Draws a shape within the given graphics context.
void stroke(const BezierPath &path, const Paint &paint, double lineWidth=1.0, Shape::BlendMode blendMode=Shape::BlendMode::Normal, Shape::LineCapStyle lineCapStyle=Shape::LineCapStyle::Butt, Shape::LineJoinStyle lineJoinStyle=Shape::LineJoinStyle::Miter, double miterLimit=10.0)
Draws a line along the path using the given stroke color and drawing attributes.
AnyAllocatorReference allocator
The allocator the user can use to amortize the cost the allocating memory for either temporary alloca...
Definition GraphicsContext.hpp:50
void clear(const Rect2 &target, const Color &color=Color::zero)
Clears the given target region with the given color.
void drawOverlay(const Rect2 &area)
Draws an overlay that helps debugging views.
A class that encapsulates a 2D paint object.
Definition Shape.hpp:27
SPtr< T > getPointer() const noexcept
Definition ResourceHandle.hpp:234
A type that describes a conjunction of shapes that can be filled and stroked.
Definition Shape.hpp:198
BlendMode
Compositing operations for images.
Definition Shape.hpp:248
@ Normal
Paints the source image samples over the background image samples.
LineCapStyle
Constants that specify the shape of endpoints for an open path when it is stroked.
Definition Shape.hpp:202
@ Butt
Specifies a butt line cap style for endpoints for an open path when stroked.
LineJoinStyle
Constants that specify the shape of the joins between connected segments of a stroked path.
Definition Shape.hpp:218
@ Miter
Specifies a miter line shape of the joints between connected segments of a stroked path.
An object that coordinates the layout and display of text characters.
Definition TextLayoutManager.hpp:74
Definition Application.hpp:19
foonathan::memory::any_allocator_reference AnyAllocatorReference
Definition Allocator.hpp:98
SPtr< Texture > TexturePtr
Definition Forward.hpp:17
@ Color
Attachment is used for color output.
auto parent(const Entity &parent)
Sets the entity parent.
Definition Helpers.hpp:52
auto transform(Container &container, Transform &&transform)
Returns an iterable object that iterates over the values of the container and applies transform to ev...
Definition Iterator.hpp:436
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
A structure that represents a snapshot of the graphics context state.
Definition GraphicsCommandBuffer.hpp:45
std::function< void(GPUCommandBuffer &, const GraphicsState &)> Command
A function type that represents the command to be called before rendering the .
Definition GraphicsCommandBuffer.hpp:188