Bezier曲线,bspline曲线,Cubic bspline曲线和bmp图像 [英] Bezier curver, bspline curve, Cubic bspline curve and bmp image

查看:148
本文介绍了Bezier曲线,bspline曲线,Cubic bspline曲线和bmp图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Dears All,

我需要你的帮助。



我是C#初学者。

我想在C#.Net中构建一个Windows应用程序,应用程序应设计多个阶段 - 基于曲线生成的安全文档并导出为Bmp文件。

伪程序:



step1-导入bmp文件。

步骤2 - 将bmp转换为2D数组。

第3步 - 绘制使用曲线生成在特定位置的数组(参数[Bezier,B样条和立方B样条])。

步骤4 - 在所需位置添加所需文本。

step 4将结果数组导出为bmp文件。

步骤5 - 可能是再次导入的同一文件以进一步绘制 - 转到步骤1.



我面临2D曲线绘制问题(参数[Bezier,B样条和立方B样条])二维矩阵生成编程然后将结果导出为Bmp文件。



我在网上调查了有关此类主题的参考资料,但我找不到满足我需求的东西。

你可以帮我吗?如果您有任何有用的建议,参考,代码示例或任何可能有助于此主题,我将不胜感激。



非常感谢您的支持。

Dears All,
Kindly i need your help.

I’m a C# beginner.
I want to build a windows application in C#.Net, the application should design-on multiple phases- a secure document based on curves generation and exported as Bmp file.
Pseudo procedure:

step1-import bmp file.
step 2-transform the bmp to 2D array.
step 3-draw on the array in specific locations using curves generation(parametric [Bezier, B-spline and cubic B-Spline]).
step 4-add desired text on desired location.
step 4-export the result array as bmp file.
step 5-may be the same file imported again for further drawing—go to step1.

I’m facing a problem with 2D Drawing of curves(parametric [Bezier, B-spline and cubic B-Spline] ) generation programming on 2D matrix then export results as Bmp file.

I surveyed the Web for references about such subject, but I don’t find anything meet my needs.
can you help me please? If you have any useful advice, references, code examples, or anything may help in this subject I’ll be grateful.

Your kind support is highly appreciated.

推荐答案

我假设您知道如何绘制曲线,但在绘制位图时遇到问题。以下是如何操作:为此位图创建位图,获取 System.Drawing.Graphics 的实例,并将其用于绘制。类似于:



I assume you know how to draw the curves but have a problem with drawing on bitmaps. Here is how you do it: you create a bitmap, obtain and instance of the System.Drawing.Graphics for this bitmap, and use it for drawing. Something like:

int width = //...
int height = //...

//...

string fileName = //...

//...

using (System.Drawing.Bitmap bitmap = new Bitmap(width, height)) {
    System.Drawing.Graphics graphics = System.Drawing.Graphics.FromImage(bitmap);
    // draw on bitmap using graphics:
                // graphics.DrawBeziers,
                // graphics.DrawBezier,
                // graphics.DrawCurve,
                //etc.
    bitmap.Save(fileName);
} // important: bitmap.Dispose is automatically called here





请参阅:

http://msdn.microsoft.com/en-us/library/system.drawing.graphics.aspx [ ^ ],

http://msdn.microsoft.com/en-us/library/system.drawing.bitmap.aspx [ ^ ],

http://msdn.microsoft.com/en-us/ library / system.drawing.image.aspx [ ^ ]。



-SA



Please see:
http://msdn.microsoft.com/en-us/library/system.drawing.graphics.aspx[^],
http://msdn.microsoft.com/en-us/library/system.drawing.bitmap.aspx[^],
http://msdn.microsoft.com/en-us/library/system.drawing.image.aspx[^].

—SA


这篇关于Bezier曲线,bspline曲线,Cubic bspline曲线和bmp图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆