Page 2 of 3
Re: Canvas background color
Posted: Mon Oct 30, 2017 10:56 am
by freak
Adding the option to set a background color only solves half the problem. You would still have the same effect if you actually need to draw something except the background color into the resized area.
Re: Canvas background color
Posted: Mon Oct 30, 2017 11:32 am
by walbus
And what is the problem for solving the halfe problem ?
A unchangeable presetted white background is simple senseless....
ut amplio
Re: Canvas background color
Posted: Mon Oct 30, 2017 12:25 pm
by IdeasVacuum
I understand that point Freak, but when the canvas is simply resized without any drawing on it other than a box to set it's colour, the flicker issue is there - if the colour could be preset (like a container gadget for example), that would make a difference.
Ignoring the flicker issue, it would still be nice to be able to preset the back colour rather than having to draw it.
Re: Canvas background color
Posted: Mon Oct 30, 2017 1:12 pm
by walbus
It doesn't seem to matter much what the users want
There is a simple question :
What does a chief do without Indians ?
Re: Canvas background color
Posted: Mon Oct 30, 2017 1:16 pm
by Fred
walbus wrote:It doesn't seem to matter much what the users want
It's not because we don't implement a feature we don't care about what users wants. A quick search shows 900 features and requests granted:
http://www.purebasic.fr/english/search. ... mit=Search
Re: Canvas background color
Posted: Mon Oct 30, 2017 1:37 pm
by IdeasVacuum
... I second that Fred. It's almost impossible to get feature requests implemented in most other programming languages, many of which are well behind PB anyway.
Re: Canvas background color
Posted: Mon Oct 30, 2017 1:39 pm
by freak
walbus wrote:It doesn't seem to matter much what the users want
There is a simple question :
What does a chief do without Indians ?
If you don't have anything constructive to add why do you even post here? As others have shown here, it is possible to have a civilized discussion about the actual issue even if the opinions might differ. Maybe you should give that a try.
@everyone else:
I am looking into the issue. We'll see what can be done about it.
Re: Canvas background color
Posted: Mon Oct 30, 2017 1:46 pm
by walbus
@Freak
Because you didn't answer my questions !
Being insulted is also not a solution...
We are also normal people and you can answer us if we ask, with whole sentences
We, the users, are your customers, not your servants and petitioners
Re: Canvas background color
Posted: Mon Oct 30, 2017 2:12 pm
by freak
Can you point me to the insult please? Or the half sentence maybe? I tried to have a normal discussion, but obviously that is not possible.
In case you were wondering: This is the exact reason why I rarely respond in the Feature request forum anymore.
Re: Canvas background color
Posted: Mon Oct 30, 2017 2:29 pm
by walbus
Freak, PB is freds and your software, i think
Fixing bugs is so primarily your problem, not mine
Nobody wants software with many bugs
It's not just about this thread
I haven't had any joy in programming for a long time
Why am I doing it anyway ?
Think about it !
It's not about arguing either
I can look back many years, many things, i see, are not new to me
You mean I shouldn't be wondering if you don't write in the forum anymore
Now I have to laugh, is it my forum or yours ?
I also don't care about it at all !
Re: Canvas background color
Posted: Mon Oct 30, 2017 2:53 pm
by Kuron
freak wrote:@everyone else:
I am looking into the issue. We'll see what can be done about it.
Thank you.
Re: Canvas background color
Posted: Wed Nov 01, 2017 5:54 pm
by freak
I think I have a good solution now.
- I changed the resize code so that if you bind a callback to the #PB_EventType_Resize event for the CanvasGadget, you get a chance to update the content before the resized content is drawn to the screen. This way there is no flicker, even if you draw stuff into the resized area.
- I also added SetGadgetColor() support as well, so can define the color for the resized area
So the example from above will have to look like this for a flicker-free resize:
Code: Select all
Procedure ResizeOne()
If StartDrawing (CanvasOutput (1))
Box(0, 0, GadgetWidth (1), GadgetHeight (1), #Red)
StopDrawing()
EndIf
EndProcedure
Procedure ResizeTwo()
If StartDrawing (CanvasOutput (2))
Box(0, 0, GadgetWidth (2), GadgetHeight (2), #Green)
StopDrawing()
EndIf
EndProcedure
OpenWindow (0, 0, 0, 1280, 1024, "SplitterGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
CanvasGadget (1, 0, 0, 0, 0)
CanvasGadget (2, 0, 0, 0, 0)
SplitterGadget (0, 1, 1, 1278, 1022, 1, 2)
ResizeOne()
ResizeTwo()
BindGadgetEvent(1, @ResizeOne(), #PB_EventType_Resize)
BindGadgetEvent(2, @ResizeTwo(), #PB_EventType_Resize)
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
All this will be in PB 5.70.
Re: [Implemented] Canvas background color
Posted: Wed Nov 01, 2017 6:37 pm
by davido
@
freak,
Thank you for taking so much trouble to sort this out.
It is very much appreciated.
Re: [Implemented] Canvas background color
Posted: Wed Nov 01, 2017 6:43 pm
by walbus
davido wrote:@
freak,
Thank you for taking so much trouble to sort this out.
It is very much appreciated.
Aut viam inveniam aut faciam (Hannibal)
Re: [Implemented] Canvas background color
Posted: Wed Nov 01, 2017 7:46 pm
by HanPBF
Can't wait to buy the upgrade version!
Thanks a lot for this going to be updated!