/* * Copyright 2006 The Android Open Source Project * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file.
*/
// This correctly favors the lower-pixel when y0 is on a 1/2 pixel boundary #define SkEdge_Compute_DY(top, y0) (SkLeftShift(top, 6) + 32 - (y0))
struct SkEdge { enum Type {
kLine_Type,
kQuad_Type,
kCubic_Type
};
SkEdge* fNext;
SkEdge* fPrev;
SkFixed fX;
SkFixed fDX;
int32_t fFirstY;
int32_t fLastY;
Type fEdgeType; // Remembers the *initial* edge type
int8_t fCurveCount; // only used by kQuad(+) and kCubic(-)
uint8_t fCurveShift; // appled to all Dx/DDx/DDDx except for fCubicDShift exception
uint8_t fCubicDShift; // applied to fCDx and fCDy only in cubic
int8_t fWinding; // 1 or -1
int setLine(const SkPoint& p0, const SkPoint& p1, const SkIRect* clip, int shiftUp); // call this version if you know you don't have a clip inlineint setLine(const SkPoint& p0, const SkPoint& p1, int shiftUp); inlineint updateLine(SkFixed ax, SkFixed ay, SkFixed bx, SkFixed by); void chopLineWithClip(const SkIRect& clip);
bool setCubicWithoutUpdate(const SkPoint pts[4], int shiftUp, bool sortY = true); int setCubic(const SkPoint pts[4], int shiftUp); int updateCubic();
};
int SkEdge::setLine(const SkPoint& p0, const SkPoint& p1, int shift) {
SkFDot6 x0, y0, x1, y1;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.