|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
Posted: Mon Nov 18, 2013 8:42 am Post subject: |
|
|
These are all old features (say 15 years old). |
|
Back to top |
|
|
JohnCampbell
Joined: 16 Feb 2006 Posts: 2560 Location: Sydney
|
Posted: Mon Nov 18, 2013 1:07 pm Post subject: |
|
|
Paul,
My version does not recognise "!FTN95$WINAPP" Is this a new compiler control syntax ?
I then get a run-time error "%bb requires button_icon/button_string" at line 30
Is this a consequence of recent changes to %bb ?
Code: | [FTN95/Win32 Ver. 6.10.0 Copyright (c) Silverfrost Ltd 1993-2011]
0001) !FTN95$WINAPP
*** Missing expression
PROCESSING MODULE [<VV> FTN95/Win32 v6.10.0]
1 ERROR [<CB> FTN95/Win32 v6.10.0]
NO ERRORS [<VV> FTN95/Win32 v6.10.0]
NO ERRORS [<MAIN> FTN95/Win32 v6.10.0]
[Silverfrost SRC/WIN32 Ver 3.65 Copyright (c) Silverfrost Ltd 2011]
NO ERRORS [<SRCTEMP@SRC/WIN32 Ver 3.65]
*** Compilation failed
[FTN95/Win32 Ver. 6.10.0 Copyright (c) Silverfrost Ltd 1993-2011]
PROCESSING MODULE [<VV> FTN95/Win32 v6.10.0]
NO ERRORS [<CB> FTN95/Win32 v6.10.0]
NO ERRORS [<VV> FTN95/Win32 v6.10.0]
NO ERRORS [<MAIN> FTN95/Win32 v6.10.0]
[Silverfrost SRC/WIN32 Ver 3.65 Copyright (c) Silverfrost Ltd 2011]
NO ERRORS [<SRCTEMP@SRC/WIN32 Ver 3.65]
Creating executable: vv.EXE
|
I need to get more up to date with the changes to Clearwin+
John |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2390 Location: Yateley, Hants, UK
|
Posted: Mon Nov 18, 2013 3:48 pm Post subject: |
|
|
%vs is documented in CWPLUS.ENH as number 35, as far back as ver 4.2, and we are over 330 now!
CWPLUS.ENH enhancements are sometimes in FTN95.CHM, sometimes not.
Eddie |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
Posted: Mon Nov 18, 2013 8:08 pm Post subject: |
|
|
Yes %bb is new. Replace it with %bt.
Use WINAPP in place of the comment embedded directive. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
Posted: Tue Nov 19, 2013 11:28 am Post subject: |
|
|
A large part of my sample program could be built into the ClearWin+ library via a new option %ch[vscrollbar]. There is also the potential for a similar horizontal scroll bar. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
Posted: Fri Nov 22, 2013 11:00 pm Post subject: |
|
|
I have uploaded a new ClearWin+ beta to http://www.silverfrost.com/beta/salflibc.exe
This contains new options that provide a window with scrolling controls.
Here is a sample that illustrates how it works...
Code: | !FTN95$WINAPP
program main
integer ii, ctrl, wd, ht
!child window with controls...
ii=winio@("%sh&",ctrl)
!Add your controls here...
ii=winio@("Sample containing scrolling child window..&")
ii=winio@("%3nl%cn%6bb[OK]&")
ii=winio@("%3nl%cn%6bb[Cancel]")
!Main window to display child with vertical scroll bar...
ii=winio@("%ww[no_maxbox]&")
ii=winio@("%ca[Scroll demo]&")
wd = 280; ht = 150
ii=winio@("%sz&",wd,ht)
ii=winio@("%ch[vscrollbar]",ctrl)
end program
RESOURCES
1 24 default.manifest
|
|
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2828 Location: South Pole, Antarctica
|
Posted: Sat Nov 23, 2013 7:21 am Post subject: |
|
|
Nice! All these features (and now options to set transparency and font and line smoothing I found in the archive) are very welcome. That antialiasing makes 2D scientific graphs look very professional and transparency opens the way to do things before possible only with OpenGL. Scrolling is needed for making more complex GUIs. Just for full happiness would be great also to have few options for scroll bars of different styles/widths and colors like we now see in current mobile applications.
Follow up: Also i noticed that CWP texts became transparent (the ones like i=winio@('Here is some text') ) when they are written on wallpaper textures. A lot of good additions lately! |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2828 Location: South Pole, Antarctica
|
Posted: Wed Nov 27, 2013 1:26 am Post subject: |
|
|
Followup2 The couple problems with this SALFLIBC i found is that older compiled EXEs do not start now with the message "The procedure entry point _export_pcx could not be located in dynamic link library". If i recompile the files all works OK
And another is under investigation (preliminary, the default thickness of the lines equal to one pixel plotted by draw_line@ has been changed to 2 or even 3 or most probably i have an error somewhere because this takes place only on one part of the code) |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
Posted: Wed Nov 27, 2013 8:06 am Post subject: |
|
|
Dan
If you don't manage to fix this problem in your code, can you post a sample to illustrate it. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
Posted: Thu Nov 28, 2013 8:56 am Post subject: |
|
|
I have uploaded a new salflibc.dll (same URL as above).
This brings the GDI+ additions (for smoothing and opacity) up to date.
draw_characters can now use the GDI+ library for rotated text. |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2828 Location: South Pole, Antarctica
|
Posted: Fri Nov 29, 2013 12:30 am Post subject: |
|
|
I was not able to reproduce yet the first mentioned problem (better say annoyance, since after recompilation all works fine. But in the future when some problems will happen with my code and I will try to run older versions of it to find the difference I will need to use older salflibc to run) with export_pcx on smaller program. The second one is most probably my own bug. This latest salflibc does not yet fix some conflict with something in pcx part. Did not looked yet at smoothing and opacity in detail |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2828 Location: South Pole, Antarctica
|
Posted: Sun Dec 08, 2013 12:42 am Post subject: |
|
|
UPDATE
I've ran the example shown in ENH file which adds GDI+ and transparency which works but when i added user_resize to %gr i got just empty screen.
Code: |
winapp
program main
include <windows.ins>
c_external nARGB@ '__nargb'(VAL,VAL,VAL,VAL):integer
c_external SET_SMOOTHING_MODE@ '__set_smoothing_mode'(VAL):integer
integer cb
external cb
!
! iw = winio@("%pv%^gr[black,full_mouse_input,box_selection,user_resize,rgb_colours,popup]&",450,200, cb)
! iw = winio@("%pv%gr[black,full_mouse_input,box_selection,rgb_colours,popup]&",450,200)
iw = winio@("%pv%^gr[user_resize]&",450,200,cb)
iw = winio@("%ac[esc]&",'exit')
call draw_line_between@(5,158,440,188, RGB@(0,20,0))
call select_font@("Arial")
call size_in_pixels@(16,0)
! call italic_font@(1)
call bold_font@(1)
call draw_characters@("No antiAlias Smoothing", 65, 200, RGB@(0,20,0,255))
call set_line_width@(8)
call set_line_style@(PS_GEOMETRIC+PS_ENDCAP_SQUARE)
call draw_line_between@(5,4,5,108, nARGB@(255,0,0,255))
call draw_line_between@(25,4,25,108, RGB@(255,0,0))
call draw_line_between@(5,10,25,10, nARGB@(255,0,255,0))
call draw_line_between@(5,30,25,30, nARGB@(112,0,255,0))
call draw_line_between@(5,50,25,50, RGB@(255,0,255))
call set_line_style@(PS_GEOMETRIC+PS_ENDCAP_FLAT)
call set_line_width@(16)
iw = set_smoothing_mode@(5) !SmoothingModeAntiAlias8x8
call draw_line_between@(50,4,150,104, RGB@(255,0,0))
call draw_line_between@(150,4,50,104, nARGB@(192,0,0,255))
call draw_ellipse@(225,60,50,50, nARGB@(255,0,255,0))
call draw_filled_ellipse@(225,60,50,50, nARGB@(192,255,0,0))
call draw_rectangle@(320,10,420,110, nARGB@(255,255,0,0))
call draw_filled_rectangle@(320,10,420,110, nARGB@(192,0,255,0))
call set_line_width@(1)
call draw_line_between@(5,154,440,184, RGB@(255,0,0))
call select_font@("Arial")
call size_in_pixels@(16,0)
! call italic_font@(1)
call bold_font@(1)
call draw_characters@("AntiAlias Smoothing", 65, 150, RGB@(255,0,0,255))
iw = winio@(" ")
end
integer function cb()
cb=1
end function cb
|
Also seems Windows 8 already has all fonts antialiased by default so using AA option does not change anything - or i have done something wrong5,10,25,10, nARGB@ |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
Posted: Sun Dec 08, 2013 10:21 am Post subject: |
|
|
As I recall, with %gr[user_resize], you need to do the redrawing in the callback function. |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2828 Location: South Pole, Antarctica
|
Posted: Sun Dec 08, 2013 3:38 pm Post subject: |
|
|
Not sure this is the case here but my another error is definitely present in the code above. Here is modified code with just one line moved up and introduction of %lw. Since it works fine with user_resize my first suspicion was wrong. Well, will try to search for another reason i do not get transparency in my larger code where i have tried to add this transparency feature. And this was actual reason for my post above. Since the change in the code to add GDI+ is mere 2-3 more lines of code plus the substitution of RGB@ to nARGB@, i'm still puzzling where is problem - i get all the plots as if there is no transparency at all. The line AA smoothing works perfect, all curves now look unusually great. Plotting goes slower though, clearly visible with 100 curves plotted simultaneously. Since OpenGL would do that instantly great would be to try to accelerate GDI+ if possible.
(By the way this search in the dark forest is typical for programming with CWP. For example, i just noticed another puzzle -- why %pv does not resize in this demo code? For everyone who wants some warm up in non-normative language try to fix that in less then 1 hour. That is why i lovely call it Swearwin. . Things like %pv happen 10 times per day, so don't actually lose your time to answer that question! )
Code: |
winapp
program main
include <windows.ins>
!use clrwin
c_external nARGB@ '__nargb'(VAL,VAL,VAL,VAL):integer
c_external SET_SMOOTHING_MODE@ '__set_smoothing_mode'(VAL):integer
integer cb
external cb
!
! iw = winio@("%pv%^gr[black,full_mouse_input,box_selection,user_resize,rgb_colours,popup]&",ix,iy,cb)
! iw = winio@("%pv%gr[black,full_mouse_input,box_selection,rgb_colours,popup]&",ix,iy,cb)
ix=450;iy=200
iw = winio@('%pv%^gr[user_resize]&',ix,iy,cb)
iw = winio@("%ac[esc]&",'exit')
iw = winio@("%lw",ilw)
call draw_line_between@(5,158,440,188, RGB@(0,20,0))
call select_font@("Arial")
call size_in_pixels@(16,0)
call italic_font@(1)
call bold_font@(1)
call draw_characters@("No AntiAlias Smoothing", 165, 200, RGB@(0,20,0))
call set_line_width@(8)
call set_line_style@(PS_GEOMETRIC+PS_ENDCAP_SQUARE)
call draw_line_between@(5,4,5,108, nARGB@(255,0,0,255))
call draw_line_between@(25,4,25,108, RGB@(255,0,0))
call draw_line_between@(5,10,25,10, nARGB@(255,0,255,0))
call draw_line_between@(5,30,25,30, nARGB@(112,0,255,0))
call draw_line_between@(5,50,25,50, RGB@(255,0,255))
call set_line_style@(PS_GEOMETRIC+PS_ENDCAP_FLAT)
call set_line_width@(16)
iw = set_smoothing_mode@(5) !SmoothingModeAntiAlias8x8
call draw_line_between@(50,4,150,104, RGB@(255,0,0))
call draw_line_between@(150,4,50,104, nARGB@(192,0,0,255))
call draw_ellipse@(225,60,50,50, nARGB@(255,0,255,0))
call draw_filled_ellipse@(225,60,50,50, nARGB@(192,255,0,0))
call draw_rectangle@(320,10,420,110, nARGB@(255,255,0,0))
call draw_filled_rectangle@(320,10,420,110, nARGB@(192,0,255,0))
call set_line_width@(1)
call draw_line_between@(5,154,440,184, RGB@(255,0,0))
call select_font@("Arial")
call size_in_pixels@(16,0)
call italic_font@(1)
call bold_font@(1)
call draw_characters@("AntiAlias Smoothing", 165, 156, RGB@(255,0,0,255))
end
integer function cb()
cb=1
end function cb
|
Last edited by DanRRight on Mon Dec 09, 2013 2:51 pm; edited 1 time in total |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7934 Location: Salford, UK
|
|
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
|