Silverfrost Forums

Welcome to our forums

More Diagnostics for %pl of Simpleplot

21 Mar 2013 12:02 #11853

Choosing fonts with this compiler is just one line of Fortran text.

	call SELECT_FONT@( Fontname) 

Same one line is making it bold/regular/italic or change its size. I do that with my regular 2D graphics for years choosing any of 300 available fonts in the computer. I have difficulty only with 3D fonts of OpenGL, because i never learned OpenGL seriously, just by tries and faults inspired by this compiler examples and there were no font usage example 😄

So if try to find the owner and ask him to release the code sources changing fonts would be super easy. As well as turning all into real*8 and fixing its damn tic marks misplacement in %pl because finding font length and hight to center it correctly is also just one line of text.

call get_text_size@ ('YourText', ifontLength, ifontHight)

Then, if all will be successful, i hope that Paul would find how to recompile it for 64-bit. I'm trying to stress again that it is at least much easier then to write the new graphics package from scratch - that is YEARS of work

23 Mar 2013 11:26 #11871

Dan,

The date on the DLL is the giveaway. 3rd party software developers couldn't implement TrueType fonts as quickly as Microsoft, and it is only in Windows 98 that they became reasonably accessible. Before that, the problem of fonts was almost insurmountable. I was using pen plotters at the time, and I remember spending ages digitising plotter fonts with pen_up, pen_down and move_pen commands. They looked unrecognisable at small sizes and horrible at large sizes. FTN77/DBOS graphics used similar stick fonts digitised as the 'Hershey fonts', with equivalent problems. The simpleplot developers must have faced the same problems. I agree that it is a shame that BUSS withdrew, and agree that it would be excellent if Simpleplot could be brought up to date, but I don't think it can happen.

Eddie

25 Mar 2013 12:00 #11876

Does David Butland or any others from BUSS still exist ? Would it be possible to contact someone who developed the software and see if they would now allow some maintenance of these problems ? Or did they withdraw their association with Salford/Silverfrost ?

We are now getting to the stage where old Fortran packages are now being lost!

John

29 Mar 2013 9:37 #11906

I have added the sample code above to the ClearWin+ documentation in the standard help file ftn95.chm.

1 May 2013 2:55 #12130

Agustin, I just right now noticed from your 2D x-y plot example when tried to play with it a bit more that it does not allow mouse resize using %pv. Can it be done? Or if it can which means using %pl, then all axis ticks always misalign (and that is exactly the case in similar direct call to SIMPLE.DLL example from FTN95 Help)?

6 May 2013 8:59 #12173

%dw can be resized as stated in the Help file, but it needs a call-back function....here is the new code for my old plot....remember that you need the spwin module that I did not put here this time...

module funciones
contains
integer function bitmap()
use spwin
use mswin
integer x,y,resize,bitmapdc
real*4,dimension(100) ::xarr,yarr
integer*4 :: narr,ltype,xscale,yscale,ctype,i,ans
character(8) :: xlabel='x',ylabel='y',ptype
real*4 :: minx,maxx,miny,maxy
resize=clearwin_info@('GRAPHICS_RESIZING')
IF(resize.EQ.1)THEN
x=clearwin_info@('GRAPHICS_WIDTH')
y=clearwin_info@('GRAPHICS_DEPTH')
HDC_DIM%iWidth = x
HDC_DIM%iHeight = y
HDC_DIM%iBitmapDC=clearwin_info@('GRAPHICS_DC')
CALL SP_SupplyBitmap     ! Pass Bitmap to SIMPLEPLOT
narr=0
do i=1,100
  xarr(i)=2*i
  yarr(i)=i*i
  narr=narr+1
end do 
minx=minval(xarr)
maxx=maxval(xarr)
miny=minval(yarr)
maxy=maxval(yarr)
xscale=1;yscale=1
call initsp
call pgfull(.true.)
!scale factor for text in graph
call textmg(1.5)
!characters set
call chset(0)
!direction of ticks: in, out
call axsbtk('XC','I')
call axsbtk('YC','O')
!line thickness
call thckmg('L',2.0)
!location of labels in the axes
CALL AXLBJS('**', 'Centre')
minx=minval(xarr)
maxx=maxval(xarr)
miny=minval(yarr)
maxy=maxval(yarr)
!define the graph scales: max and min values of x and y and the type of scales: 1-linear, 2-log
xscale=1;yscale=1
CALL SCALES(minx,maxx,xscale,miny,maxy,yscale)
!pen color 1...for axes
call pen(4)
!cross point of x and y
call axcrss('YC',minx)
! labels of axes
CALL AXES7(xlabel, ylabel)    
!pen color for data  
call pen(2)
!full line or dashed? 
!ltype=0, full line,ltype=1, dashed
ltype=0
ptype='scatter'
ptype='curve'
if(ptype=='curve') then
!cvtype=1 -> smooth
!cvtype=3 -> straight lines  
ctype=3
call cvtype(ctype)
CALL BRKNCV(real(xarr,1),real(yarr,1),narr,ltype)
else !scatter
CALL MKSET(1) !set of markers 1,2,3......
CALL MARKCV(real(xarr,1),real(yarr,1),narr,mtype,nstep)
endif
endif
bitmap=2
end function bitmap
end module funciones

program Resized_Simpleplot_plots
!requires simpleplot.dll
use mswin
use spwin
use funciones
implicit none
integer*4 ans
external bitmap
ans=winio@('%ca[A Simple Plot with Simpleplot]%bg[grey]&')
ans=winio@('%ww%pv%^dw[user_resize]&',800,600,bitmap) ! Pass bitmapDC to ClearWin
ans=winio@('%ff%nl%cn%6bt[Close]')
end program resized_simpleplot_plots

Hope this helps....

best regards,

Agustin

7 May 2013 5:29 #12175

Thanks, Agustin

Please login to reply.