/* * METHODS : VALIDATORS CONTENT * */ internal StatusGV.TypeStatusExec ValidateSimpBBox(GErrList gerrlist) { if ((this.bbox==null)||(this.outl==null)) { //throw new ExceptionGlyph("Glyph","ValidateSimpBBox",null); return StatusGV.TypeStatusExec.Aborted; } BoxD bboxCP; // bbox for the control points bboxCP=this.outl.BBoxCP; if (!bbox.Equals(bboxCP)) { GErrBBox gerrBbox=new GErrBBox(this.IndexGlyph, this.typeGlyph, this.bbox,bboxCP); gerrlist.Add(gerrBbox); } BoxD bboxOutl; // bbox for Outline bboxOutl=this.outl.BBox; //bboxOutline.SetEnlargeFU(); if (!bboxOutl.Equals(bboxCP)) { // warning GErrExtremeNotOnCurve gerrExtreme=new GErrExtremeNotOnCurve(this.IndexGlyph, this.typeGlyph,bboxCP,bboxOutl); gerrlist.Add(gerrExtreme); } return StatusGV.TypeStatusExec.Completed; }
internal StatusGV.TypeStatusExec ValidateCompBBox(GErrList gerrlist) { if ((this.bbox==null)||(this.outl==null)) { //throw new ExceptionGlyph("Glyph","ValidateCompBBox",null); return StatusGV.TypeStatusExec.Aborted; } BoxD bboxCP; // bbox for the control points bboxCP=this.outl.BBoxCP; if (!this.bbox.Equals(bboxCP)) { double deviation=this.bbox.DeviationMax(bboxCP); bool toSkipError=((this.outl.IsChangedByRound)&&(Math.Abs(deviation)<=1.0)); if (!toSkipError) { GErrBBox gerrBbox=new GErrBBox(this.IndexGlyph, this.typeGlyph, this.bbox,bboxCP); gerrlist.Add(gerrBbox); } } BoxD bboxOutl; // bbox for Outline bboxOutl=this.outl.BBox; //bboxOutline.SetEnlargeFU(); if (!bboxOutl.Equals(bboxCP)) { // warning GErrExtremeNotOnCurve gerrExtreme=new GErrExtremeNotOnCurve(this.IndexGlyph, this.typeGlyph,bboxCP,bboxOutl); gerrlist.Add(gerrExtreme); } return StatusGV.TypeStatusExec.Completed; }