U++ framework
Do not panic. Ask here before giving up.

Home » Developing U++ » U++ Developers corner » Drawing Question
Drawing Question [message #4934] Sat, 26 August 2006 19:46 Go to next message
Anonymous
when look into the Paint routine of TreeCtrl and ArrayCtrl,strange to see when drawing a line,DrawRect is used not DrawLine,so why,can someone teach me this?

[Updated on: Sat, 26 August 2006 19:48] by Moderator

Report message to a moderator

Re: Drawing Question [message #4935 is a reply to message #4934] Sat, 26 August 2006 22:24 Go to previous message
unodgs is currently offline  unodgs
Messages: 1367
Registered: November 2005
Location: Poland
Ultimate Contributor

hongdong wrote on Sat, 26 August 2006 13:46

when look into the Paint routine of TreeCtrl and ArrayCtrl,strange to see when drawing a line,DrawRect is used not DrawLine,so why,can someone teach me this?

Because is faster to draw a rectangle than a line on most gpus. If you simulate drawing horizonal and vertical lines using recangles gpu dosn't have to calculate bresenham factors and can optimize memory writes - whatever that could mean Wink (because it knows that gfx memory will be accessed lineary).
Previous Topic: upp package installer
Next Topic: SO for Draw, Esc and other packages
Goto Forum:
  


Current Time: Tue Apr 28 16:41:58 GMT+2 2026

Total time taken to generate the page: 0.01580 seconds