int appendPath(const PathCommand* cmds, size_t cmdCnt, const Point* pts, size_t ptsCnt) noexcept;
//Stroke
- int stroke(size_t width) noexcept;
+ int stroke(float width) noexcept;
int stroke(size_t r, size_t g, size_t b, size_t a) noexcept;
int stroke(const size_t* dashPattern, size_t cnt) noexcept;
int stroke(StrokeCap cap) noexcept;
int fill(size_t* r, size_t* g, size_t* b, size_t* a) const noexcept;
int bounds(float* x, float* y, float* w, float* h) const noexcept override;
- size_t strokeWidth() const noexcept;
+ float strokeWidth() const noexcept;
int strokeColor(size_t* r, size_t* g, size_t* b, size_t* a) const noexcept;
size_t strokeDash(const size_t** dashPattern) const noexcept;
StrokeCap strokeCap() const noexcept;
}
-int Shape::stroke(size_t width) noexcept
+int Shape::stroke(float width) noexcept
{
auto impl = pImpl.get();
assert(impl);
}
-size_t Shape::strokeWidth() const noexcept
+float Shape::strokeWidth() const noexcept
{
auto impl = pImpl.get();
assert(impl);
- if (!impl->stroke) return -1;
+ if (!impl->stroke) return 0;
return impl->stroke->width;
}
struct ShapeStroke
{
- size_t width = 0;
+ float width = 0;
size_t color[4] = {0, 0, 0, 0};
size_t* dashPattern = nullptr;
size_t dashCnt = 0;
return 0;
}
- bool strokeWidth(size_t width)
+ bool strokeWidth(float width)
{
//TODO: Size Exception?