Link to home
Start Free TrialLog in
Avatar of auk_ie
auk_ie

asked on

DirectX from GDI+

Hello

I'm making an application in which I want to display some waveforms. I know how to do this in GDI+, but thought that because sometimes the GDI+ is slow and because I need to display the waves in realtime, I should use managed DirectX. I don't need to use fancy 3D graphics just 2D with a bit of zoom in and zoom out.

So I've started out drawing my grid. The grid will be an outline of the window with 10 horizontal and vertical lines intersecting the window.

DirectX doesn't make it easy drawing lines and such. I miss the ease of the DrawLine method of the GDI+.

Anyway to draw the grid I'm using a VertexBuffer and some CustomVertex objects in which i define my grid points.Then I use DrawPrimitives i.e PrimitiveType.LineStrip to draw the outline of my grid.

After all that I got a rectangle drawn and some lines intersecting it along the horizontal and vertical.

But how do I change the line thickness? Is there an easier way to go about this? Any suggestions on the overall implementation using DirectX and some general advise on  how to go about it.
ASKER CERTIFIED SOLUTION
Avatar of Alexandre Simões
Alexandre Simões
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of furqanchandio
furqanchandio

opengl is much easier as compared to directdraw and you can easily change the line thickness there