*/
mDrawableList.clear();
mRootLayer->renderList(mDrawableList);
+ VRect clip(0, 0, surface.width(), surface.height());
for (auto &e : mDrawableList) {
- e->preprocess();
+ e->preprocess(clip);
}
VPainter painter(&bitmap);
#include "vdasher.h"
#include "vraster.h"
-void VDrawable::preprocess()
+void VDrawable::preprocess(const VRect &clip)
{
if (mFlag & (DirtyState::Path)) {
if (mStroke.enable) {
}
mRleTask = VRaster::generateStrokeInfo(
std::move(mPath), std::move(mRle), mStroke.cap, mStroke.join,
- mStroke.width, mStroke.meterLimit);
+ mStroke.width, mStroke.meterLimit, clip);
} else {
mRleTask = VRaster::generateFillInfo(
- std::move(mPath), std::move(mRle), mFillRule);
+ std::move(mPath), std::move(mRle), mFillRule, clip);
}
mRle = VRle();
mFlag &= ~DirtyFlag(DirtyState::Path);
void setStrokeInfo(CapStyle cap, JoinStyle join, float meterLimit,
float strokeWidth);
void setDashInfo(float *array, uint size);
- void preprocess();
+ void preprocess(const VRect &clip);
VRle rle();
public: