2011-07-26 25 views
2

次のコードはコンパイルされますが、メソッドが呼び出されると、System.NotImplementedException: Not implemented.私はカスタムクラスを使用しません。C#System.Drawing Graphic実装されていない例外

private void miterTopLeft(Image img, Graphics gfx) 
{ 
    int maxSize = Math.Max(img.Height, img.Width); 
    Point[] points = new Point[4]; 
    points[0] = new Point(0, 0); 
    points[1] = new Point(maxSize, maxSize); 
    points[2] = new Point(0, maxSize); 
    points[3] = new Point(0, 0); 
    gfx.DrawImage(img, points); 
} 

.NETクラスでこのエラーが発生するのはなぜですか?回避策はありますか?

スタックトレース:

[NotImplementedException: Not implemented.] 
System.Drawing.Graphics.CheckErrorStatus(Int32 status) +1154064 
System.Drawing.Graphics.DrawImage(Image image, PointF[] destPoints) +150 
GetMergeImage.miterTopLeft(Image img, Graphics gfx) in d:\.NET Projects\publish2\GetMergeImage.ashx:51 
GetMergeImage.drawLeftBorderRectangeRug(Double ppi, Boolean hasCorner, Graphics gfx, DesignVO border, Image img, Double vBorderStartY, Double vBorderStartX, Double vBorderNumRepeat) in d:\.NET Projects\publish2\GetMergeImage.ashx:243 
GetMergeImage.drawRectangularRug(Int32 displayWidth, Int32 displayHeight, Int32 width, Int32 height, MergeVO merge) in d:\.NET Projects\publish2\GetMergeImage.ashx:140 
GetMergeImage.ProcessRequest(HttpContext context) in d:\.NET Projects\publish2\GetMergeImage.ashx:40 
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100 
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75 
+0

スタックトレースとは何ですか? – SLaks

+0

なぜあなたは 'Rectangle'を渡しませんか? – SLaks

+0

@SLaks、三角形が必要です – Joe

答えて

関連する問題