forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

insert grafic functions
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
Bartl



Joined: 16 Oct 2009
Posts: 58
Location: München

PostPosted: Mon Oct 29, 2012 8:30 pm    Post subject: Reply with quote

Hi Eddi,
a very good solution, thank you.

It seems that all my ideas can be realized.

Johann
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2816
Location: South Pole, Antarctica

PostPosted: Mon Nov 05, 2012 8:50 pm    Post subject: Reply with quote

jalih: good job, and by the way your clock is nice advertisement for Clearwin. As well as the source text is the best school by learning on examples. I remember how 20 years ago i was jealous when my colleague among scientific works was also programming nice looking Rolex watch with crystals using Pascal while i with my Fortran couldn't even think about something like this.
Back to top
View user's profile Send private message
Bartl



Joined: 16 Oct 2009
Posts: 58
Location: München

PostPosted: Tue Nov 06, 2012 8:04 am    Post subject: Reply with quote

Hi,
I only can agree.
I was surprised about the simple code for the clock, it’s a very good example and a great help for further developments.

For me simple examples are the greatest help.
Thank you.

Johann
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Tue Nov 06, 2012 9:21 am    Post subject: Reply with quote

I have had a quick look at the "Test für Grafikausgabe" sample which I agree is very useful.

A minor correction is that the call to select_graphics_region@ would be suspect if it were not redundant. The handle should be set before calling winio@ with %gr otherwise it will use the random value that the handle has at that point (which may well be zero). As you probably know already, with only one graphics region, you don't need to provide the handle - ClearWin+ sets it to -1 internally.

It is interesting to note that you can draw to the graphics region before completing the winio@ statements. In all these years I have never tried or thought of doing that!
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Thu Nov 08, 2012 9:02 pm    Post subject: Reply with quote

I remember writing in a thread "When is a handle not a handle?" about the difference between the functions that RETURN a handle, and the functions that need a handle TO BE SUPPLIED. Paul's note reminds me that this distinction is somewhat blurred, as %gr operates perfectly adequately without a user-supplied handle if there is only one %gr, but really needs user-supplied handles if there is more than one %gr.

I suppose that it never hurts to give a handle an initial value!

Eddie
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Fri Nov 09, 2012 10:23 am    Post subject: Reply with quote

I suppose not since, if the system returns a value then the value you supply will simply be overwritten.
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Fri Nov 09, 2012 11:43 am    Post subject: Reply with quote

... but you could get in a muddle if you assumed the user-supplied value still applied!

E
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7924
Location: Salford, UK

PostPosted: Fri Nov 09, 2012 12:37 pm    Post subject: Reply with quote

Yes, either way you need to pass a reference to the handle as a variable and use this variable consistently.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
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
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group