RECT_P but without filling
|
11-27-2015, 01:35 PM
Post: #1
|
|||
|
|||
RECT_P but without filling
Hi,
I tried to draw a rectangle, but without filling a color. I didn't use the fillColor parameters but it fill with border color. Code:
is there a tips for that ? Thank you. |
|||
11-27-2015, 02:46 PM
(This post was last modified: 11-27-2015 02:46 PM by DrD.)
Post: #2
|
|||
|
|||
RE: RECT_P but without filling
Code:
|
|||
11-27-2015, 03:18 PM
Post: #3
|
|||
|
|||
RE: RECT_P but without filling
Hi,
(11-27-2015 02:46 PM)DrD Wrote: RECT_P(G0,130,90,190,110,#DDDDDDh,#FFFFFFFFh); // Rectangle, no fillIt's not exactly "no fill", but "white filled." For real "no fill", better to start on something like that : Code: RECT_P_NOFILL(x,y,x2,y2,col) primer |
|||
11-27-2015, 11:26 PM
(This post was last modified: 11-27-2015 11:33 PM by Tim Wessman.)
Post: #4
|
|||
|
|||
RE: RECT_P but without filling
(11-27-2015 03:18 PM)primer Wrote: Hi, Yes, it is "no fill". Specifically, a fill a a maximum alpha value. For more clarity: RECT_P(10,10,50,50,RGB(35,45,55),RGB(0,0,0,255)); //fill will be completely transparent due to the last optional 4th alpha argument No need for a custom function here. TW Although I work for HP, the views and opinions I post here are my own. |
|||
11-30-2015, 09:04 AM
Post: #5
|
|||
|
|||
RE: RECT_P but without filling
Indeed, I was wrong at counting the number of "F"
but with RGB(0,0,0,255) (#FF000000h) it's clear, thanks. helpfull tips ! Thanks. primer |
|||
11-30-2015, 03:33 PM
(This post was last modified: 11-30-2015 06:29 PM by eried.)
Post: #6
|
|||
|
|||
RE: RECT_P but without filling
Both functions take almost the same time :O
Code: RECT_P_NOFILL(x,y,x2,y2,col) My website: ried.cl |
|||
11-30-2015, 06:08 PM
Post: #7
|
|||
|
|||
RE: RECT_P but without filling
Hello eried,
your code is calling RECT_P_NO2FILL 2 times. Or are I'm wrong? |
|||
11-30-2015, 06:28 PM
Post: #8
|
|||
|
|||
RE: RECT_P but without filling
(11-30-2015 06:08 PM)Thomas_Sch Wrote: Hello eried, Oh, you are right! that's why the performance was so similar, the routine using lines is much slower (62848 vs 48717 ticks) My website: ried.cl |
|||
11-30-2015, 08:42 PM
Post: #9
|
|||
|
|||
RE: RECT_P but without filling
That's funny I made same kind of test, but I didn't test same thing as you.
I didn't think about colors, but about rectangle size. I guess bigger rectangle may be slower. here is my code, I'm varying the rect size. Code: RECT_P_NOFILL0(x,y,x2,y2,col); * avg 313 for RECT * avg 460 for LINEs LINEs solution is about 50% slower than RECT. Your bench show about 30% slower, in both case RECT is better. primer |
|||
11-30-2015, 09:55 PM
Post: #10
|
|||
|
|||
RE: RECT_P but without filling
What about using the more advanced form of LINE_P?
Graph 3D | QPI | SolveSys |
|||
12-01-2015, 06:19 AM
Post: #11
|
|||
|
|||
RE: RECT_P but without filling
Hello,
rect_p with a trensparent 'middle' will be drawn by 2 internal calls to h_line and 2 to v_line... it would be hard to be faster. In addition, it is also fast because there is little to no work needed to work on the input arguements... line_p takes a whole lot more work to create the input as they are more complex. Cyrille Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)