Page 1 of 1

Simple Line

Posted: Tue Apr 22, 2008 16:57
by Ninja
Hi Guys

How can i make a simple Line i mean i can add a line graphic to my imageset but what do i need to add after that is where i'am stuck :oops:


TIA

Posted: Tue Apr 22, 2008 18:30
by CrazyEddie
Hi,

It very much depends on exactly what you want to do and how you intend to use the 'line'.

If for example your desire is to be able to draw line of some kind between two arbitrary points, this will be very difficult to achieve unless the lines are perfectly vertical or perfectly horizontal - even then you may need a separate image for each direction. This is because in all versions released so far there is no support for actual drawing operations, we just support rendering 'brushes' - either scaled or tiled.

Anyhow, let us know what you're actually trying to do :)

CE

Posted: Wed Apr 23, 2008 08:24
by Ninja
Hiya CrazyEddie

All i'am basically after is a line seperator for example i have a window and want to cut that into two sections top and bottom defined by a sepeating line if that makes sense.

GroupBox could do this and i have used it in another window but for this window its a bit of overkill to use that.


TIA

Posted: Thu Apr 24, 2008 18:37
by CrazyEddie
Hi,

All you need to do is render the image for the line, stretched across the desired width.

How you actually do that may be a matter for debate...

- You could add it as an ImageryComponent in the skin definition.
- You could create a custom window renderer to extract some info from a property to draw the line(s).
- You could subscribe the the events for rendering started / ended and draw the lines yourself, manually (never tried this, in some of the stuff I've been looking at I'm not happy with when or how often these events are fired, so this solution is probably a bad idea :) ).

No time for specific examples at the moment - sorry :oops:

CE.

Posted: Thu May 01, 2008 12:28
by Ninja
Hiya

sorry for the delay in answering was my week for kids :D

thanks for the clearing that up