Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Drawing Question
Drawing Question [message #4934] Sat, 26 August 2006 19:46 Go to next message
unknown user
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: 1366
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: Sun May 05 16:07:35 CEST 2024

Total time taken to generate the page: 0.02751 seconds