tweaks
This commit is contained in:
parent
822c60d839
commit
44bc283f4f
5 changed files with 61 additions and 8 deletions
|
|
@ -82,6 +82,19 @@ void Canvas::frame(RectF rec, const RGBA& col, halnf round) {
|
|||
// nvgFill(mContext->vg);
|
||||
}
|
||||
|
||||
void Canvas::line(Vec2F start, Vec2F end, const RGBA& col, halnf thickness) {
|
||||
start += mOrigin;
|
||||
end += mOrigin;
|
||||
|
||||
nvgBeginPath(mContext->vg);
|
||||
nvgFillColor(mContext->vg, { col.r, col.g, col.b, col.a});
|
||||
nvgMoveTo(mContext->vg, start.x, start.y);
|
||||
nvgLineTo(mContext->vg, end.x, end.y);
|
||||
nvgStrokeWidth(mContext->vg, thickness);
|
||||
nvgStrokeColor(mContext->vg, { col.r, col.g, col.b, col.a });
|
||||
nvgStroke(mContext->vg);
|
||||
}
|
||||
|
||||
void Canvas::circle(Vec2F pos, halnf size, const RGBA& col) {
|
||||
pos += mOrigin;
|
||||
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ namespace tp {
|
|||
void circle(Vec2F pos, halnf size, const RGBA& col);
|
||||
void text(const char*, const RectF&, halnf size, Align, halnf padding, const RGBA&);
|
||||
void colorWheel(const RectF& rec, const ColorWheel& colorWheel);
|
||||
void line(Vec2F start, Vec2F end, const RGBA& col, halnf thickness);
|
||||
|
||||
ImageHandle createImageFromTextId(ualni id, Vec2F size);
|
||||
void updateTextureID(ImageHandle handle, ualni id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue