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 » U++ Library support » U++ Library : Other (not classified elsewhere) » Painter DrawLine proposal
Painter DrawLine proposal [message #23781] Sat, 21 November 2009 14:56 Go to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Mirek

Now Painter function DrawLine is shifted to the South East.

void Painter::DrawLineOp(int x1, int y1, int x2, int y2, int width, Color color)
{
	double h = width / 2;
	Move(x1 + h, y1 + h);
	Line(x2 + h, y2 + h);*/
	DrawLineStroke(width, color);
}


However Draw DrawLine function is centered to the axis x1, y1 and x2, y2.

I propose you to have the same behavior in both so the Painter function would be:

void Painter::DrawLineOp(int x1, int y1, int x2, int y2, int width, Color color)
{
	Move(x1, y1);
	Line(x2, y2);
	DrawLineStroke(width, color);
}


This way the code for a control in a .usc file is valid in a .cpp file. And the behavior in Painter is more natural.

What do you think ?

Best regards
Koldo





Best regards
IƱaki
Re: Painter DrawLine proposal [message #23792 is a reply to message #23781] Sun, 22 November 2009 23:05 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Yes. Applied. Not sure what I was thinking... Smile

Mirek
Previous Topic: User lists of "bad" naming of classes, functions etc in U++...
Next Topic: Util.cpp static sIniFile BUG FIX
Goto Forum:
  


Current Time: Thu Mar 28 20:17:22 CET 2024

Total time taken to generate the page: 0.01022 seconds