本文介绍了有人可以告诉我如何计算图片上图形对象的像素数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法获得图片上存在的曲线对象的像素数
我尝试过的事情:
i can't get number of pixels in curve object that exists on a picture
What I have tried:
Pen mypen = new Pen(Color.Red,10);
Point[] arrayPoints = new Point[asistant.NumberOfShapes()];
// assistant is a list of points
for(int i =0 ; i < assistant.NumberOfShapes(); i++)
{
arrayPoints[i]= asistant.GetShape(i).Location;
}
e.Graphics.DrawClosedCurve(mypen,arrayPoints);
推荐答案
Pen mypen = new Pen(Color.Red,10);
Point[] arrayPoints = new Point[asistant.NumberOfShapes()];
for(int i =0 ; i < asistant.NumberOfShapes(); i++)
{
arrayPoints[i]= asistant.GetShape(i).Location;
}
e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
e.Graphics.DrawClosedCurve(mypen,arrayPoints);
这篇关于有人可以告诉我如何计算图片上图形对象的像素数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!