|
|
Home » Developing U++ » UppHub » Scatter Control
|
|
|
|
Re: Scatter Control [message #21619 is a reply to message #18797] |
Fri, 29 May 2009 23:41 |
|
koldo
Messages: 3361 Registered: August 2008
|
Senior Veteran |
|
|
Hello all
I use daily Scatter control.
It works well and it has nice looking.
Is it going to be a new release?
A thing I would add is to scroll dragging the mouse and zoom rolling the middle mouse button.
Best regards
Koldo
Best regards
Iñaki
[Updated on: Fri, 29 May 2009 23:42] Report message to a moderator
|
|
|
|
|
|
|
Re: Scatter Control [message #22511 is a reply to message #22502] |
Mon, 20 July 2009 16:01 |
andrei-catalin
Messages: 62 Registered: May 2006 Location: Romania
|
Member |
|
|
I made some small changes to the scatter control in order to eliminate compilation errors and other small problems.
I would be grateful if someone could update these files in svn. (I currently do not have svn access).
Andrei
-
Attachment: Scatter.zip
(Size: 32.59KB, Downloaded 315 times)
[Updated on: Mon, 20 July 2009 16:18] Report message to a moderator
|
|
|
Re: Scatter Control [message #22512 is a reply to message #22511] |
Mon, 20 July 2009 21:35 |
|
andrei-catalin wrote on Mon, 20 July 2009 17:01 | I made some small changes to the scatter control in order to eliminate compilation errors and other small problems.
I would be grateful if someone could update these files in svn. (I currently do not have svn access).
Andrei
|
Committed!
Thanks!
|
|
|
|
|
Re: Scatter Control [message #24123 is a reply to message #22518] |
Sun, 27 December 2009 18:21 |
|
andrei-catalin wrote on Tue, 21 July 2009 17:34 | Nice! Thanks!
Andrei
|
Hello Andrei,
Exist any updates to Scatter control?
With respect, Ion (tojocky)
|
|
|
Re: Scatter Control [message #26232 is a reply to message #6350] |
Fri, 16 April 2010 02:35 |
ktj9
Messages: 17 Registered: April 2010
|
Promising Member |
|
|
Hello,
I tried to run TestScatter2, but it is stuck in infinite loops in Scatter::SetRange and Scatter::SetMajorUnits. Callers are scatter2.SetRange(12,60) and scatter2.SetMajorUnits(2,10) in Tab2::Tab2().
I am using UPP2232, MSC8, on XP.
I use magic numbers to solve the problem, but I bet there are better solutions, if I understand the meaning of those members.
After the hack, the example looks great! Thanks!
Scatter &Scatter::SetRange(double rx, double ry, double ry2)
{
xRange=rx;
yRange=ry;
yRange2=ry2;
xMajorUnit=xRange/10;
int count=0;
while (xMinUnit > xMajorUnit && count < 1000){
xMinUnit -= xMajorUnit;
++count;
}
yMajorUnit=yRange/10;
count = 0;
while (yMinUnit > yMajorUnit && count < 1000){
yMinUnit -= yMajorUnit;
++count;
}
yMajorUnit2=yRange2/10;
count = 0;
while (yMinUnit2 > yMajorUnit2 && count < 1000) {
yMinUnit2 -= yMajorUnit2;
++count;
}
return *this;
}
Scatter &Scatter::SetMajorUnits(double ux, double uy)
{
//if (ux > xRange) throw (Exc(t_("Invalid X major units!")));
//if (uy > yRange) throw (Exc(t_("Invalid Y major units!")));
xMajorUnit=ux;
yMajorUnit=uy;
yMajorUnit2=yRange2*yMajorUnit/yRange;
int count=0;
while (xMinUnit > xMajorUnit && count < 1000){
xMinUnit -= xMajorUnit;
++count;
}
count = 0;
while (yMinUnit > yMajorUnit && count < 1000){
yMinUnit -= yMajorUnit;
++count;
}
count = 0;
while (yMinUnit2 > yMajorUnit2 && count < 1000){
yMinUnit2 -= yMajorUnit2;
++count;
}
return *this;
}
|
|
|
Re: Scatter Control [message #26235 is a reply to message #26232] |
Fri, 16 April 2010 06:50 |
|
koldo
Messages: 3361 Registered: August 2008
|
Senior Veteran |
|
|
ktj9 wrote on Fri, 16 April 2010 02:35 | Hello,
I tried to run TestScatter2, but it is stuck in infinite loops in Scatter::SetRange and Scatter::SetMajorUnits. Callers are scatter2.SetRange(12,60) and scatter2.SetMajorUnits(2,10) in Tab2::Tab2().
I am using UPP2232, MSC8, on XP.
I use magic numbers to solve the problem, but I bet there are better solutions, if I understand the meaning of those members.
After the hack, the example looks great! Thanks!
Scatter &Scatter::SetRange(double rx, double ry, double ry2)
{
xRange=rx;
yRange=ry;
yRange2=ry2;
xMajorUnit=xRange/10;
int count=0;
while (xMinUnit > xMajorUnit && count < 1000){
xMinUnit -= xMajorUnit;
++count;
}
yMajorUnit=yRange/10;
count = 0;
while (yMinUnit > yMajorUnit && count < 1000){
yMinUnit -= yMajorUnit;
++count;
}
yMajorUnit2=yRange2/10;
count = 0;
while (yMinUnit2 > yMajorUnit2 && count < 1000) {
yMinUnit2 -= yMajorUnit2;
++count;
}
return *this;
}
Scatter &Scatter::SetMajorUnits(double ux, double uy)
{
//if (ux > xRange) throw (Exc(t_("Invalid X major units!")));
//if (uy > yRange) throw (Exc(t_("Invalid Y major units!")));
xMajorUnit=ux;
yMajorUnit=uy;
yMajorUnit2=yRange2*yMajorUnit/yRange;
int count=0;
while (xMinUnit > xMajorUnit && count < 1000){
xMinUnit -= xMajorUnit;
++count;
}
count = 0;
while (yMinUnit > yMajorUnit && count < 1000){
yMinUnit -= yMajorUnit;
++count;
}
count = 0;
while (yMinUnit2 > yMajorUnit2 && count < 1000){
yMinUnit2 -= yMajorUnit2;
++count;
}
return *this;
}
|
Hello ktj9
I have run TestScatter2 in Bazaar and it works well for me. The code you have submitted seems not to be the last one.
The version I use is 2322.
Best regards
Iñaki
|
|
|
|
Goto Forum:
Current Time: Wed May 15 05:03:33 CEST 2024
Total time taken to generate the page: 0.03947 seconds
|
|
|