Home » Developing U++ » UppHub » Scatter: use NONMARK
Scatter: use NONMARK [message #26707] |
Thu, 20 May 2010 09:22 |
|
Hello All,
I prepared a little patch for use NONMARK draw marks. It is useful when i do not need to use marks!
A little screenshot:
and patch:
Index: bazaar/Scatter/Scatter.cpp
===================================================================
--- bazaar/Scatter/Scatter.cpp (revision 2410)
+++ bazaar/Scatter/Scatter.cpp (working copy)
@@ -1102,10 +1102,12 @@
case CROSS : ptMark=&Scatter::Cross; break;
case X : ptMark=&Scatter::XFunct; break;
case RHOMB:ptMark=&Scatter::Rhomb; break;
+ case NONMARK:ptMark=NULL; break;
default : ptMark=&Scatter::Circle; break;
}
- (*this.*ptMark)(w,scale,cp,size,markColor);
+ if(ptMark!=NULL)
+ (*this.*ptMark)(w,scale,cp,size,markColor);
}
Scatter &Scatter::SetMouseHandling(bool valx, bool valy)
Index: bazaar/Scatter/Scatter.h
===================================================================
--- bazaar/Scatter/Scatter.h (revision 2410)
+++ bazaar/Scatter/Scatter.h (working copy)
@@ -25,7 +25,8 @@
TRIANGLE,
CROSS,
X,
- RHOMB
+ RHOMB,
+ NONMARK
};
enum Formats
{
I cannot attach the patch file because I have not permission to attach more than 1 file!
Best regards, Ion.
|
|
|
Re: Scatter: use NONMARK [message #26711 is a reply to message #26707] |
Thu, 20 May 2010 10:25 |
|
tojocky wrote on Thu, 20 May 2010 10:22 | Hello All,
I prepared a little patch for use NONMARK draw marks. It is useful when i do not need to use marks!
A little screenshot:
and patch:
Index: bazaar/Scatter/Scatter.cpp
===================================================================
--- bazaar/Scatter/Scatter.cpp (revision 2410)
+++ bazaar/Scatter/Scatter.cpp (working copy)
@@ -1102,10 +1102,12 @@
case CROSS : ptMark=&Scatter::Cross; break;
case X : ptMark=&Scatter::XFunct; break;
case RHOMB:ptMark=&Scatter::Rhomb; break;
+ case NONMARK:ptMark=NULL; break;
default : ptMark=&Scatter::Circle; break;
}
- (*this.*ptMark)(w,scale,cp,size,markColor);
+ if(ptMark!=NULL)
+ (*this.*ptMark)(w,scale,cp,size,markColor);
}
Scatter &Scatter::SetMouseHandling(bool valx, bool valy)
Index: bazaar/Scatter/Scatter.h
===================================================================
--- bazaar/Scatter/Scatter.h (revision 2410)
+++ bazaar/Scatter/Scatter.h (working copy)
@@ -25,7 +25,8 @@
TRIANGLE,
CROSS,
X,
- RHOMB
+ RHOMB,
+ NONMARK
};
enum Formats
{
I cannot attach the patch file because I have not permission to attach more than 1 file!
Best regards, Ion.
|
Thanks to Koldo for hint me to use SetShowMark function to hide mark!
My propose is not valid!
|
|
|
Re: Scatter: use NONMARK [message #26712 is a reply to message #26711] |
Thu, 20 May 2010 10:35 |
|
koldo
Messages: 3394 Registered: August 2008
|
Senior Veteran |
|
|
However tojocky advice is helpful
I will upload today a change in AddSeries so that if mark width is <= 1 then vShowMark is set to false. Until now always was set to true so it always tried to do a mark per plotted point.
Best regards
IƱaki
|
|
|
Goto Forum:
Current Time: Sat Sep 21 03:27:13 CEST 2024
Total time taken to generate the page: 0.02601 seconds
|