PDA

View Full Version : Soft lines with canvas



Iguana
17-11-2004, 09:17 AM
Hi All!
Is posible with DelphiX Canvas, draw smooth lines? I draw lines with MoveTo and then LineTo methods, but this is not look good. Maybe is alternative method to draw lines (i thing not) to draw smooth lines?
Thanks for answer!
Iguana

WILL
05-12-2004, 10:52 AM
DelphiX uses only TCanvas type methods of drawing to a DirectDrawSurface. You'd have to create your own or look into another library for such functionality.

Hope this helps. Best of luck!

Crisp_N_Dry
08-12-2004, 09:56 PM
Not to dismiss what Will said but I shall go into a bit more detail. I believe what you are after is "anti-aliased" lines. This involves drawing the line pixel by pixel in any colour you like (Let's say black for example) and then placing a slightly lighter colour either side of each pixel so that it blends in with the surrounding image, this works best when the blend colour is a mixture of the line colour and the colour of the surrounding image but a standard gray usually does the trick. As Will already mentioned DelphiX is not capable of doing this fast enough, in fact, in order to do it fast enough 3D acceleration is almost certainly required if framerate is an issue (and it most probably is since you're posting on a game development website). Hope this helped, if you have any trouble understanding any of this (I'm guessing English isn't your native language) then perhaps someone here can translate/reinterprate my answer. Good luck.

PS, try typing "Anti Aliasing Techniques" into Google.

nzo2
07-01-2005, 01:26 AM
Look at the WuLines functions in turbopixels. This is what you need, and I`ve yet to find any faster

AdamN
27-01-2005, 03:53 PM
Where is this turbopixels thinggy?? O_o is it part of [Un]DelphiX?

Edited: Uhh stupid me :) I'm forgot to check the Addons section XD