|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
JohnCampbell
Joined: 16 Feb 2006 Posts: 2554 Location: Sydney
|
Posted: Thu Jan 07, 2010 1:18 pm Post subject: |
|
|
Eddie,
In my %gr windows, I normally use
"s_width = clearwin_info@ ('SCREEN_WIDTH') " to return the screen width, which I assume is the pixel width of the physical screen, and
"iswidth = clearwin_info@ ('GRAPHICS_WIDTH')" to return the pixel width of the graphics window, and it works fine.
I noted in my example above in this post that 'GRAPHICS_WIDTH' returned a value of zero, as your example implies is possible. Thats why I looked in the help file to find another way of getting the window dimension. I'm not sure why this happens in this case, although I did not check all the winio@ calls for the start of the example above. Do you know why the graphics window dimension is not being returned ?
Your comments on clipping are interesting. I've always clipped. It was in the tektronix plot10 approach and I have always used this. I thought I had problems in clearwin+ if I did not truncate text.
Not clipping is much simpler. I should try the polygon filling without clipping, but the simple test that the polygon is totally outside the window can save a lot of calls to the graphics routines. The other suggestion from Smib, of defining a clipping region by:
Code: | ijhndl=clearwin_info@('GRAPHICS_HDC')
ihdr=CreateRectRgn(ixtop,iytop,ixbot,iybot)
call SelectClipRgn(ijhndl,ihdr)
|
is also worth checking
Something to check in the summer break !!
Thanks John |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Thu Jan 07, 2010 1:56 pm Post subject: |
|
|
John,
I only get graphics width as zero if the screen has been resized, and in that case, I make it 1 before calculating any scaling etc, because 0 doesn't work. I tend to get depth as well as width, and work out scaling based on whichever (depth or width) is the controlling factor.
Without Smib's code resetting the clip limits, they are the edge of the graphics region.
Eddie |
|
Back to top |
|
|
jjgermis
Joined: 21 Jun 2006 Posts: 404 Location: Nürnberg, Germany
|
Posted: Fri Feb 05, 2010 9:13 am Post subject: |
|
|
I played a bit the code and managed to get the desired result of the FEA polygons (input for the triangular mesher). Adding menus is still something I have to practice with! Anyway, many colleagues were amazed when I told them I did it using Fortran! Image:
I used http://www.bilder-space.de/ to upload the image. |
|
Back to top |
|
|
|
|
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
|