English 中文(简体)
参考文献
原标题:Anti aliasing DrawLine on CE

我正在使用C#.NET 3.5,在Windows CE中选取一个Graphics的物体。

我使用的守则就是这样:

e.Graphics.DrawLine(new Pen(Color.FromArgb(11, 118, 200), 2), x1, y1, x2, y2);

然而,由于乞讨等原因,这项工作非常可怕。 我是否可引出一条反 alia的路线?

From what I can tell the Graphics object doesn t support this natively but is there anyway to "cheat" this effect using some trickery?

最佳回答

如果你重新利用坚实的彩色背景,那么你就可以在实际界线之前在背景肤色和线肤色之间划上更厚的笔和颜色,例如,在利用黑背景时:

e.Graphics.DrawLine(new Pen(Color.FromArgb(5, 59, 100), 3), x1, y1, x2, y2);
e.Graphics.DrawLine(new Pen(Color.FromArgb(11, 118, 200), 2), x1, y1, x2, y2);

这增加了一条线上的“低线”(即使完全是横向/纵向线)。

问题回答

我感到痛苦。 我几年前也做了类似的事情。 NETCF和我正在走各种不愉快的道路。 完成的工作比起更多。 审视这一 a:

rel=“nofollow noreferer” http://freespace.virgin.net/hugo.elias/graphics/x_wuline.htm

http://social.msdn.microsoft.com/Forums/en-US/netfxcompact/thread/b34f56c4-585b-4ff5-ac7d-b6e2ae516ccf/“rel=“nofollow noreferer”>http://social.msdn.microsoft.com/Forums/en-US/netfxcompact/thread/b34f56c4-585bff5-ac7d-b6e2a516/ccf

此外,这可能有助于回答,但可以成为WM GDI系统的有用替代。

http://drawingcf.codeplex.com/

question http://www.amanithvg.com/project.html“rel=“nofollow noreferer” http://www.amanithvg.com/project.html。 该网络与Windows CE图书馆共同提供一个开放式的GL类似框架。 Might be mega-overllsbeit for a small Line.

最后,你可以总是使用一份比照图,但你可能会在晚些时候出现透明度问题。

创立这个XrossGDI+完成本土C#:





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签