mirror of
https://github.com/rive-app/rive-cpp.git
synced 2026-01-18 21:21:17 +01:00
Simplify factory and renderer APIs
Some good idea, perhaps for the future, but for now we don't take advantage of (nor does canvas2d support) ... - local matrix on gradients or images - tiling modes on gradients or images - patterns (i.e. image->makeShader()) ... so removing these (speculative) APIs from our porting layers. If we decide to support some of these in the future, easy to add them back (but for now, we never used or tested them). Diffs= 034d4f833 Simplify factory and renderer APIs
This commit is contained in:
@@ -24,18 +24,14 @@ namespace rive {
|
||||
float ey,
|
||||
const ColorInt colors[], // [count]
|
||||
const float stops[], // [count]
|
||||
size_t count,
|
||||
RenderTileMode,
|
||||
const Mat2D* localMatrix = nullptr) override;
|
||||
size_t count) override;
|
||||
|
||||
rcp<RenderShader> makeRadialGradient(float cx,
|
||||
float cy,
|
||||
float radius,
|
||||
const ColorInt colors[], // [count]
|
||||
const float stops[], // [count]
|
||||
size_t count,
|
||||
RenderTileMode,
|
||||
const Mat2D* localMatrix = nullptr) override;
|
||||
size_t count) override;
|
||||
|
||||
// Returns a full-formed RenderPath -- can be treated as immutable
|
||||
std::unique_ptr<RenderPath>
|
||||
|
||||
@@ -17,10 +17,6 @@ namespace rive {
|
||||
public:
|
||||
SokolRenderImage(sg_image image);
|
||||
sg_image image() const { return m_Image; }
|
||||
|
||||
rcp<RenderShader> makeShader(RenderTileMode, RenderTileMode, const Mat2D*) const override {
|
||||
return nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
class SokolTessRenderer : public TessRenderer {
|
||||
|
||||
@@ -35,9 +35,7 @@ rcp<RenderShader> SokolFactory::makeLinearGradient(float sx,
|
||||
float ey,
|
||||
const ColorInt colors[], // [count]
|
||||
const float stops[], // [count]
|
||||
size_t count,
|
||||
RenderTileMode,
|
||||
const Mat2D* localMatrix) {
|
||||
size_t count) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -46,9 +44,7 @@ rcp<RenderShader> SokolFactory::makeRadialGradient(float cx,
|
||||
float radius,
|
||||
const ColorInt colors[], // [count]
|
||||
const float stops[], // [count]
|
||||
size_t count,
|
||||
RenderTileMode,
|
||||
const Mat2D* localMatrix) {
|
||||
size_t count) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user