internal override void Flatten(PartFlattener flattener) { #if DEBUG flattener.dbugSetCurrentOwnerPart(this); #endif flattener.GeneratePointsFromLine( this.FirstPoint, new Vector2f(x1, y1)); }
internal override void Flatten(PartFlattener flattener) { #if DEBUG flattener.dbugSetCurrentOwnerPart(this); #endif flattener.GeneratePointsFromCurve3( flattener.NSteps, this.FirstPoint, //first new Vector2f(x2, y2), //end new Vector2f(x1, y1)); //control1 }
public void Flatten(PartFlattener flattener) { //flatten once if (_analyzed) { return; } //flatten each part ... //------------------------------- int j = parts.Count; //--------------- List <Vertex> prevResult = flattener.Result; List <Vertex> tmpFlattenPoints = flattenPoints = flattener.Result = new List <Vertex>(); //start ... for (int i = 0; i < j; ++i) { //flatten each part parts[i].Flatten(flattener); } //check duplicated the first point and last point int pointCount = tmpFlattenPoints.Count; if (Vertex.SameCoordAs(tmpFlattenPoints[pointCount - 1], tmpFlattenPoints[0])) { //check if the last point is the same value as the first //if yes => remove the last one tmpFlattenPoints.RemoveAt(pointCount - 1); pointCount--; } //assign number for all glyph point in this contour for (int i = 0; i < pointCount; ++i) { tmpFlattenPoints[i].SeqNo = i; } flattener.Result = prevResult; _analyzed = true; }
internal abstract void Flatten(PartFlattener flattener);