Sproull算法的抗锯齿线

Sproull算法的抗锯齿线

本文介绍了基于Gupta-Sproull算法的抗锯齿线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我通常是MFC和VC ++编程的新手.我现在想做的是编写一个程序,该程序可以让我基于Gupta-Sproull中点算法来画线.有Bresenham算法,但有所不同.我相信它不会使用距离.因此,我的想法是,如果我要在鼠标上单击鼠标左键,请在屏幕上选择一个控制点,然后将其拖动到任意位置以画一条线.如果我单击右键,则结束控制点选择.通过使用此方法,我试图编写类似WAKE的内容,其中包含许多行.

我的问题是开始学习.当我在Visual Studio中创建一个项目时,它为我提供了大量的文件以供修改.我应该从哪里开始,是否有人拥有该算法的示例代码,或者如何以及在哪里使用LButtonClick和RButtonClick ...

将为您提供任何帮助.我是本示例代码的新手,这是最好的事实.

感谢

Hello everyone,
i am new to MFC and VC++ programming in general. What i am trying to do right now is write a program that will allow me to draw lines based on a Gupta-Sproull midpoint algorithm. There is Bresenham algorithm but it''s different. I believe it does not use distance. So the idea is if i''ll left click on a mouse i select a control point on the screen and then can drag anywhere to draw a line. If i right button click then i end control point selection. By using this method i am trying to write something like WAKE which consists of bunch of lines.

My problem is to get started. When i created a project in Visual studio it gives me loads of files for modification. Where should i start and does anyone have a sample code of that algorithm or how and where to use LButtonClick and RButtonClick...

Any help will be appreaciated. The fact that i am new to this sample codes are the best.

thanks

推荐答案


这篇关于基于Gupta-Sproull算法的抗锯齿线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-23 09:23