It is currently Sat Oct 19, 2019 1:16 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 33 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: Canvas background color
PostPosted: Mon Oct 30, 2017 10:56 am 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 5:21 pm
Posts: 5781
Location: Germany
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.

_________________
quidquid Latine dictum sit altum videtur


Top
 Profile  
Reply with quote  
 Post subject: Re: Canvas background color
PostPosted: Mon Oct 30, 2017 11:32 am 
Offline
Addict
Addict

Joined: Sat Mar 02, 2013 9:17 am
Posts: 931
And what is the problem for solving the halfe problem ?

A unchangeable presetted white background is simple senseless....

ut amplio

_________________
http://www.nachtoptik.de


Top
 Profile  
Reply with quote  
 Post subject: Re: Canvas background color
PostPosted: Mon Oct 30, 2017 12:25 pm 
Offline
Always Here
Always Here

Joined: Fri Oct 23, 2009 2:33 am
Posts: 5834
Location: Wales, UK
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.

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
Reply with quote  
 Post subject: Re: Canvas background color
PostPosted: Mon Oct 30, 2017 1:12 pm 
Offline
Addict
Addict

Joined: Sat Mar 02, 2013 9:17 am
Posts: 931
It doesn't seem to matter much what the users want

There is a simple question :
What does a chief do without Indians ?

_________________
http://www.nachtoptik.de


Top
 Profile  
Reply with quote  
 Post subject: Re: Canvas background color
PostPosted: Mon Oct 30, 2017 1:16 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13622
Location: France
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:

search.php?keywords=Implemented&terms=all&author=&fid%5B%5D=3&sc=1&sf=titleonly&sk=t&sd=d&sr=topics&st=0&ch=300&t=0&submit=Search


Top
 Profile  
Reply with quote  
 Post subject: Re: Canvas background color
PostPosted: Mon Oct 30, 2017 1:37 pm 
Offline
Always Here
Always Here

Joined: Fri Oct 23, 2009 2:33 am
Posts: 5834
Location: Wales, UK
... 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.

_________________
IdeasVacuum
If it sounds simple, you have not grasped the complexity.


Top
 Profile  
Reply with quote  
 Post subject: Re: Canvas background color
PostPosted: Mon Oct 30, 2017 1:39 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 5:21 pm
Posts: 5781
Location: Germany
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.

_________________
quidquid Latine dictum sit altum videtur


Top
 Profile  
Reply with quote  
 Post subject: Re: Canvas background color
PostPosted: Mon Oct 30, 2017 1:46 pm 
Offline
Addict
Addict

Joined: Sat Mar 02, 2013 9:17 am
Posts: 931
@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

_________________
http://www.nachtoptik.de


Top
 Profile  
Reply with quote  
 Post subject: Re: Canvas background color
PostPosted: Mon Oct 30, 2017 2:12 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 5:21 pm
Posts: 5781
Location: Germany
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.

_________________
quidquid Latine dictum sit altum videtur


Top
 Profile  
Reply with quote  
 Post subject: Re: Canvas background color
PostPosted: Mon Oct 30, 2017 2:29 pm 
Offline
Addict
Addict

Joined: Sat Mar 02, 2013 9:17 am
Posts: 931
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 !

_________________
http://www.nachtoptik.de


Last edited by walbus on Tue Oct 31, 2017 8:39 am, edited 4 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Canvas background color
PostPosted: Mon Oct 30, 2017 2:53 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 17, 2009 10:51 pm
Posts: 1341
Location: Nashville
freak wrote:
@everyone else:
I am looking into the issue. We'll see what can be done about it.


Thank you.

_________________
Fangbeast for President!


Top
 Profile  
Reply with quote  
 Post subject: Re: Canvas background color
PostPosted: Wed Nov 01, 2017 5:54 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 5:21 pm
Posts: 5781
Location: Germany
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:
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.

_________________
quidquid Latine dictum sit altum videtur


Top
 Profile  
Reply with quote  
 Post subject: Re: [Implemented] Canvas background color
PostPosted: Wed Nov 01, 2017 6:37 pm 
Offline
Addict
Addict

Joined: Fri Nov 09, 2012 11:04 pm
Posts: 1681
Location: Uttoxeter, UK
@freak,

Thank you for taking so much trouble to sort this out.
It is very much appreciated. :D

_________________
DE AA EB


Top
 Profile  
Reply with quote  
 Post subject: Re: [Implemented] Canvas background color
PostPosted: Wed Nov 01, 2017 6:43 pm 
Offline
Addict
Addict

Joined: Sat Mar 02, 2013 9:17 am
Posts: 931
davido wrote:
@freak,

Thank you for taking so much trouble to sort this out.
It is very much appreciated. :D


Aut viam inveniam aut faciam (Hannibal)

_________________
http://www.nachtoptik.de


Top
 Profile  
Reply with quote  
 Post subject: Re: [Implemented] Canvas background color
PostPosted: Wed Nov 01, 2017 7:46 pm 
Offline
Enthusiast
Enthusiast

Joined: Fri Feb 19, 2010 3:42 am
Posts: 531
Can't wait to buy the upgrade version!
Thanks a lot for this going to be updated!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 33 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye