apply->interpolate(*fMaker, SkScalarMulRound(distance, 1000));
matrix = (SkDrawMatrix*) apply->getScope();
}
+ if (matrix) {
+ m = matrix->getMatrix();
+ }
}
SkScalar result = 0;
SkAnimatorScript::EvaluateFloat(*fMaker, NULL, fDraw->spacing.c_str(), &result);
}
protected:
- virtual void begin(const SkIRect& uvBounds, SkPath* )
- {
+ virtual void begin(const SkIRect& uvBounds, SkPath*) const SK_OVERRIDE {
+ const_cast<SkShape2DPathEffect*>(this)->setUVBounds(uvBounds);
+ }
+
+ virtual void next(const SkPoint& loc, int u, int v, SkPath* dst) const SK_OVERRIDE {
+ const_cast<SkShape2DPathEffect*>(this)->addPath(loc, u, v, dst);
+ }
+
+private:
+ void setUVBounds(const SkIRect& uvBounds) {
fUVBounds.set(SkIntToScalar(uvBounds.fLeft), SkIntToScalar(uvBounds.fTop),
SkIntToScalar(uvBounds.fRight), SkIntToScalar(uvBounds.fBottom));
}
- virtual void next(const SkPoint& loc, int u, int v, SkPath* dst)
- {
+ void addPath(const SkPoint& loc, int u, int v, SkPath* dst) {
fLoc = loc;
fU = u;
fV = v;
fMaker->clearExtraPropertyCallBack(fDraw->fType);
}
-private:
-
static bool Get2D(const char* token, size_t len, void* s2D, SkScriptValue* value) {
static const char match[] = "locX|locY|left|top|right|bottom|u|v" ;
SkShape2DPathEffect* shape2D = (SkShape2DPathEffect*) s2D;
first++;
}
for (int i = first; i <= last; i++) {
+ // For 32 bits platforms, the maximum offset has to fit within off_t which is a 32 bits
+ // signed integer on these platforms. On other platforms, we can use the actual maximum.
+ SkDEBUGCODE(static const off_t kMaxOff = (sizeof(off_t) > 4) ? 10000000000 : 2147483647;)
SkASSERT(fCatalog[i].fFileOffset > 0);
- SkASSERT(fCatalog[i].fFileOffset <= 9999999999LL);
+ SkASSERT(fCatalog[i].fFileOffset < kMaxOff);
stream->writeBigDecAsText(fCatalog[i].fFileOffset, 10);
stream->writeText(" 00000 n \n");
}