public void MoveTo(float x0, float y0) { this.latestMoveToX = this.curX = x0; this.latestMoveToY = this.curY = y0; _latestPart = null; //---------------------------- }
public void CloseContour() { if (curX == latestMoveToX && curY == latestMoveToY) { //we not need to close } else { if (_latestPart != null) { currentCnt.AddPart(_latestPart = new GlyphLine(_latestPart, latestMoveToX, latestMoveToY)); } else { currentCnt.AddPart(_latestPart = new GlyphLine(curX, curY, latestMoveToX, latestMoveToY)); } } this.curX = latestMoveToX; this.curY = latestMoveToY; if (currentCnt != null && currentCnt.parts.Count > 0) { this.contours.Add(currentCnt); currentCnt = null; } // currentCnt = new GlyphContour(); }
public void CloseContour() { if (_curX == _latestMoveToX && _curY == _latestMoveToY) { //we not need to close } else { if (_latestPart != null) { _currentCnt.AddPart(_latestPart = new GlyphLine(_latestPart, _latestMoveToX, _latestMoveToY)); } else { _currentCnt.AddPart(_latestPart = new GlyphLine(_curX, _curY, _latestMoveToX, _latestMoveToY)); } } _curX = _latestMoveToX; _curY = _latestMoveToY; if (_currentCnt != null && _currentCnt.parts.Count > 0) { _contours.Add(_currentCnt); _currentCnt = null; } // _currentCnt = new GlyphContour(); }
public void MoveTo(float x0, float y0) { _latestMoveToX = _curX = x0; _latestMoveToY = _curY = y0; _latestPart = null; //---------------------------- }
public GlyphLine(GlyphPart prevPart, float x1, float y1) { //this.x0 = x0; //this.y0 = y0; this.PrevPart = prevPart; this.x1 = x1; this.y1 = y1; }
public GlyphCurve3(GlyphPart prevPart, float x1, float y1, float x2, float y2) { this.PrevPart = prevPart; //this.x0 = x0; //this.y0 = y0; this.x1 = x1; this.y1 = y1; this.x2 = x2; this.y2 = y2; }
public void BeginRead(int contourCount) { //reset all contours = new List <GlyphContour>(); _latestPart = null; this.latestMoveToX = this.curX = this.latestMoveToY = this.curY = 0; // currentCnt = new GlyphContour(); //new contour, but not add }
public void LineTo(float x1, float y1) { if (_latestPart != null) { currentCnt.AddPart(_latestPart = new GlyphLine(_latestPart, x1, y1)); } else { currentCnt.AddPart(_latestPart = new GlyphLine(curX, curY, x1, y1)); } this.curX = x1; this.curY = y1; }
public void LineTo(float x1, float y1) { if (_latestPart != null) { _currentCnt.AddPart(_latestPart = new GlyphLine(_latestPart, x1, y1)); } else { _currentCnt.AddPart(_latestPart = new GlyphLine(_curX, _curY, x1, y1)); } _curX = x1; _curY = y1; }
public GlyphCurve4(GlyphPart prevPart, float x1, float y1, float x2, float y2, float x3, float y3) { //this.x0 = x0; //this.y0 = y0; this.PrevPart = prevPart; this.x1 = x1; this.y1 = y1; this.x2 = x2; this.y2 = y2; this.x3 = x3; this.y3 = y3; }
public void Curve3(float x1, float y1, float x2, float y2) { if (_latestPart != null) { currentCnt.AddPart(_latestPart = new GlyphCurve3( _latestPart, x1, y1, x2, y2)); } else { currentCnt.AddPart(new GlyphCurve3( curX, curY, x1, y1, x2, y2)); } this.curX = x2; this.curY = y2; }
public void Curve4(float x1, float y1, float x2, float y2, float x3, float y3) { if (_latestPart != null) { currentCnt.AddPart(_latestPart = new GlyphCurve4( _latestPart, x1, y1, x2, y2, x3, y3)); } else { currentCnt.AddPart(_latestPart = new GlyphCurve4( curX, curY, x1, y1, x2, y2, x3, y3)); } this.curX = x3; this.curY = y3; }
public void dbugSetCurrentOwnerPart(GlyphPart dbug_ownerPart) { this.dbug_ownerPart = dbug_ownerPart; }
public void AddPart(GlyphPart part) { parts.Add(part); }