Silverfrost Forums

Welcome to our forums

Resizing different %gr areas in the same window

27 Mar 2018 10:45 #21675

Hi,

I am experiencing a problem with my application; I am using a single window (%ww) with three different %gr areas in the window,

rslt=winio@('%ww%ca[FLUXOVIZ]&')
rslt=winio@('%1.2ob[raised]&')
rslt=winio@('%cn%ws%nl&','Painel de Controle')
rslt=winio@('%`^gr[black,rgb_colours]&',painel%xmax-painel%xmin+1,painel%ymax-painel%ymin+1,&
            id_painel_de_situacao,painel_de_situacao)
rslt=winio@('%cb&')
rslt=winio@('%`gr[white,rgb_colours]&', &
            barra_cores%xmax-barra_cores%xmin+1,barra_cores%ymax-barra_cores%ymin+1,&
            id_barra_cores)
rslt=winio@('%cb&')
rslt=winio@('%ob[no_border]&')
**rslt=winio@('%`^gr[black,rgb_colours,full_mouse_input,box_selection]&', &
            tela%xmax-tela%xmin+1,tela%ymax-tela%ymin+1,&
            id_tela,trata_mouse)**

rslt=winio@('%cb&')
rslt=winio@('%lw',janela_principal)

and would like to resize the one highlighted above, but if a use a %pv and the option user_resize, when I resize the window, the other two graphics areas move out of place...

I prefer to use three graphics areas since I can keep coordinates which are unique to each and can just select the desired graphics region...

Cheers Rudnei

28 Mar 2018 7:07 #21682

rudnei

I suggest that you post a simple and complete program that illustrates what you want to do. Then others can try out different strategies.

The best answer might be to do the resizing via the new design mode (which I plan to demonstrate on Youtube shortly). This provides an alternative resizing method that might do what you want.

p.s. 'shortly' = about two weeks.

28 Mar 2018 3:18 #21691

If you have 3 %gr areas, then you have separate coordinate systems for each, and a different callback for each, but it is much easier to keep it all in one %gr, and simply work out which one you are ina at any time. For example, if you have 3 pseudo %gr field all top aligned, your callback only has to test for the x coordinate (and so on).

Doing things in one %gr also makes the division bars movable independently, for example with 2 areas top aligned and one below them taking the full width, then you can test the pixel position and if you are in the horizontal bar you can change the cursor to arrange resizing vertically, or do the same with the vertical bar.If nice cursors aren't already in Windows/Clearwin+, there are plenty downloadable on the web. I sometimes use the 'smooth' cursors by Vlastimil Miler - they're excellent.

Eddie

10 Apr 2018 8:14 #21790

Hi,

Following Paul's request, here is an example based on the same structure my actual program is as of now:

module defs
type vet2
    real :: x,y
end type vet2
type rgb
    integer :: r,g,b
end type rgb
type viewport
    integer :: xmin,xmax,ymin,ymax
end type viewport
integer :: rslt,main_window,id_control_panel=1,id_rainbow=2,id_graphics=3
integer :: resolution
type(viewport) :: window_control_panel,window_rainbow,window_graphics,window_graphics_initial
end module defs

winapp
program test_windows
use defs
implicit none
include <windows.ins>
! external functions
integer, external :: mouse_control

    ! Viewport definitions
    resolution=int(0.6*min(clearwin_info@('SCREEN_WIDTH'),clearwin_info@('SCREEN_DEPTH')))
    window_control_panel=viewport(0,149,0,resolution/2)
    window_rainbow=viewport(0,149,0,resolution/2)
    window_graphics_initial=viewport(0,resolution-1,0,resolution-1)
    window_graphics=window_graphics_initial
    
    ! GUI
    rslt=winio@('%ww%ca[TEST]&')
    rslt=winio@('%1.2ob[raised]&')
    rslt=winio@('%cn%ws%nl&','Control Panel')
    rslt=winio@('%`gr[white,rgb_colours]&',&
                window_control_panel%xmax-window_control_panel%xmin+1,&
                window_control_panel%ymax-window_control_panel%ymin+1,&
                id_control_panel)
    rslt=winio@('%cb&')
    rslt=winio@('%`gr[blue,rgb_colours]&',&
                window_rainbow%xmax-window_rainbow%xmin+1,&
                window_rainbow%ymax-window_rainbow%ymin+1,&
                id_rainbow)
    rslt=winio@('%cb&')
    rslt=winio@('%ob[no_border]&')
    rslt=winio@('%pv%`^gr[black,rgb_colours,full_mouse_input,box_selection,user_resize]&',&
                window_graphics%xmax-window_graphics%xmin+1,&
                window_graphics%ymax-window_graphics%ymin+1,&
                id_graphics,mouse_control)
    rslt=winio@('%cb&')
    rslt=winio@('%lw',main_window)
    
    call use_approximate_colours@(0)

    ! show control panel
    call erase_window(id_control_panel,window_control_panel)
    call control_panel()
    ! draw rainbow
    call erase_window(id_rainbow,window_rainbow)
    call draw_rainbow()
    ! draw circles
    call erase_window(id_graphics,window_graphics)
    call draw_rgb_circles()
  
end program test_windows

[/code]

10 Apr 2018 8:19 #21791

And here is part 2 of the code:

subroutine control_panel()
use defs
implicit none
include <windows.ins>
integer, parameter :: items=15
integer :: i
character(len=80),dimension(items) :: buffer
    rslt=select_graphics_object@(id_control_panel)
    write(buffer(1),'(A21)')'window_control_panel:'
    write(buffer(2),'(A5,I3)')'xmin=',window_control_panel%xmin
    write(buffer(3),'(A5,I3)')'xmax=',window_control_panel%xmax
    write(buffer(4),'(A5,I3)')'ymin=',window_control_panel%ymin
    write(buffer(5),'(A5,I3)')'ymax=',window_control_panel%ymax
    write(buffer(6),'(A15)')'window_rainbow:'
    write(buffer(7),'(A5,I3)')'xmin=',window_rainbow%xmin
    write(buffer(8),'(A5,I3)')'xmax=',window_rainbow%xmax
    write(buffer(9),'(A5,I3)')'ymin=',window_rainbow%ymin
    write(buffer(10),'(A5,I3)')'ymax=',window_rainbow%ymax
    write(buffer(11),'(A16)')'window_graphics:'
    write(buffer(12),'(A5,I3)')'xmin=',window_graphics%xmin
    write(buffer(13),'(A5,I3)')'xmax=',window_graphics%xmax
    write(buffer(14),'(A5,I3)')'ymin=',window_graphics%ymin
    write(buffer(15),'(A5,I3)')'ymax=',window_graphics%ymax 
    do i=1,items
        call draw_characters@(buffer(i),2,(i-1)*10+2,rgb@(0,255,0))
    end do
    call perform_graphics_update@()
end subroutine control_panel

subroutine draw_rainbow()
use defs
implicit none
include <windows.ins>
type(rgb),dimension(7)::rainbow_colors
integer :: l,w,i,y
    rslt=select_graphics_object@(id_rainbow)
    rainbow_colors(1)=rgb(148,0,211)
    rainbow_colors(2)=rgb(75,0,130)
    rainbow_colors(3)=rgb(0,0,255)
    rainbow_colors(4)=rgb(0,255,0)
    rainbow_colors(5)=rgb(255,255,0)
    rainbow_colors(6)=rgb(255,127,0)
    rainbow_colors(7)=rgb(255,0,0)
    l=real(window_rainbow%xmax-window_rainbow%xmin)/3
    w=real(window_rainbow%ymax-window_rainbow%ymin)/8
    y=ishft(w,-1)
    do i=1,7
        call draw_filled_rectangle@(l,y,window_rainbow%xmax-l,y+w,&
                                    rgb@(rainbow_colors(i)%r,rainbow_colors(i)%g,rainbow_colors(i)%b))
        y=y+w
    end do
    call perform_graphics_update@()
end subroutine draw_rainbow
10 Apr 2018 8:20 #21792

and part 3...

integer function mouse_control()
use defs
implicit none
include <windows.ins>
type(viewport) :: selection,window
type(vet2), save :: p0,p1
integer :: mouse_flags
logical, save :: lbutton_up,lbutton_down=.FALSE., &
                 rbutton_up,rbutton_down=.FALSE.
external :: erase_window
    ! seleciona área gráfica
    rslt=select_graphics_object@(id_graphics)

    ! hack para testar redesenho ao aumentar/diminuir window
    if (clearwin_info@('GRAPHICS_RESIZING')==1) then
        call erase_window(id_control_panel,window_control_panel)
        call erase_window(id_graphics,window_graphics)
        resolution=int(0.8*min(clearwin_info@('SCREEN_WIDTH'),clearwin_info@('SCREEN_DEPTH')))
        window_control_panel=viewport(0,99,0,resolution/2)
        window_rainbow=viewport(0,99,0,resolution/2)
        window_graphics=viewport(0,resolution-1,0,resolution-1)
        call control_panel()
        call draw_rgb_circles()
    else
        ! extrai os bits de controle do mouse
        mouse_flags=clearwin_info@('GRAPHICS_MOUSE_FLAGS')

        ! trata botão esquerdo do mouse
        lbutton_up=iand(mouse_flags,MK_LBUTTON)==0
        if (lbutton_up.and.lbutton_down) then
            ! extrai coordenadas da área selecionada no SRD
            call get_graphics_selected_area@(selection%xmin,selection%ymin,selection%xmax,selection%ymax)
            if (selection%xmin>selection%xmax) then
                call swap(selection%xmin,selection%xmax)
            end if
            if (selection%ymin>selection%ymax) then
                call swap(selection%ymin,selection%ymax)
            end if
            ! Zoom-in
            if ((abs(selection%xmax-selection%xmin)>0).and.(abs(selection%ymax-selection%ymin)>0)) then
                call set_graphics_selection@(0)
                call erase_window(id_graphics,window_graphics)
                resolution=int(0.8*min(selection%xmax-selection%xmin,selection%ymax-selection%ymin))
                window_graphics=viewport(0,resolution-1,0,resolution-1)
                call draw_rgb_circles()
                ! habilita seleção
                call set_graphics_selection@(1)
            end if
        end if
        lbutton_down=.not. lbutton_up
        
        ! trata botão direito do mouse
        rbutton_up=iand(mouse_flags,MK_RBUTTON)==0
        if (rbutton_up.and.rbutton_down) then
            call erase_window(id_graphics,window_graphics)
            window_graphics=window_graphics_initial
            call erase_window(id_graphics,window_graphics)
            call draw_rgb_circles()
        end if
        rbutton_down=.not. rbutton_up
    end if
    mouse_control=1
end function mouse_control
10 Apr 2018 8:21 #21793

and part 4...

subroutine draw_rgb_circles()
use defs
implicit none
include <windows.ins>
type(vet2) :: centre
integer :: radius
    rslt=select_graphics_object@(id_graphics)
    centre=vet2(0.5*(window_graphics%xmax-window_graphics%xmin),0.5*(window_graphics%ymax-window_graphics%ymin))
    radius=0.25*min(window_graphics%xmax-window_graphics%xmin,window_graphics%ymax-window_graphics%ymin)
    call draw_filled_ellipse@(int(centre%x),int(centre%y-radius),radius,radius,rgb@(255,0,0))
    call draw_filled_ellipse@(int(centre%x-radius),int(centre%y+radius),radius,radius,rgb@(0,255,0))
    call draw_filled_ellipse@(int(centre%x+radius),int(centre%y+radius),radius,radius,rgb@(0,0,255))
    call perform_graphics_update@()
end subroutine draw_rgb_circles

subroutine erase_window(id,w)
use defs
implicit none
include <windows.ins>
integer,intent(in) :: id
type(viewport),intent(in) :: w
    rslt=select_graphics_object@(id)
    call draw_filled_rectangle@(w%xmin,w%ymin,w%xmax,w%ymax,rgb@(0,0,0))
    call perform_graphics_update@()
end subroutine erase_window

subroutine swap(a,b)
implicit none
integer, intent(inout) :: a,b
integer :: c
    c=a; a=b; b=c
end subroutine swap
11 Apr 2018 9:53 #21797

Dear John,

Thanks for your reply. Indeed this sample have some side-effects from trimming the actual code, as you have pointed out; item 1 specifically I have no idea at all since the only control I have is via the event GRAPHICS_RESIZING...

But the main thing is: how do I create this MDI? I don't have Visual Studio available... can I do it directly with ClearWin+ ?

Cheers Rudnei

15 Apr 2018 12:11 #21837

Dear John, I have been looking into the last code provided in the topic you mentioned.

Looks like it will do the trick; I'll try with my application and get back to you.

Cheers! Rudnei

15 Apr 2018 11:03 #21842

Hi John,

I have modified the code supplied in the aforementioned topic; however, the window captioned 'Simulation' is not resizable... any ideas on how to do it?

Cheers Rudnei

winapp program test_mdi1 implicit none include <windows.ins> integer :: i1,i2,i3,i4,rslt,main_window,& control_panel=1,display_bar=2,simulation=3

i1=winio@('%ca[Main Window containing an MDI frame]&amp;') 
i1=winio@('%ww[no_frame,not_fixed_size]&amp;')

i1=winio@('%pv%fr&amp;',1800,1000)
i1=winio@('%lw',main_window) 
    
i2=winio@('%ww[no_frame]%ca[Control Panel]%`gr[black,rgb_colours,metafile_resize,smooth8]&amp;', &amp;
           200,200,control_panel)
i2=winio@('%aw',main_window)

i3=winio@('%ww[no_frame]%ca[Display Bar]%`gr[white,rgb_colours,metafile_resize,smooth8]&amp;', &amp;
           100,400,display_bar)
i3=winio@('%aw',main_window)     

i4=winio@('%ww[no_frame,not_fixed_size]%ca[Simulation]%`gr[black,rgb_colours,metafile_resize,smooth8]&amp;', &amp;
           800,800,simulation)
i4=winio@('%aw',main_window)
   
! Desenha no painel de controle
rslt=select_graphics_object@(control_panel)
call draw_filled_ellipse@(100,100,80,80,rgb@(127,59,30))

! Desenha na barra de cores
rslt=select_graphics_object@(display_bar)
call draw_filled_rectangle@(2,2,398,398,rgb@(255,255,30))

! Desenha na área de simulação
rslt=select_graphics_object@(simulation)
call draw_filled_rectangle@(10,10,200,200,rgb@(30,255,30))
call draw_filled_rectangle@(100,50,120,60,rgb@(255,0,30))
call draw_filled_rectangle@(400,400,600,5000,rgb@(30,0,255))

end program test_mdi1

16 Apr 2018 7:12 #21844

I hear in my Antarctica how you guys are swearing trying to tame this wild horse called Clearwin. Even i did when tried to fix, did you hear my french? Company must make 100000 demo examples, not 10-15 like all these 20 years. Here are all 4 windows resizable (added text window), 'rgb_colours' are now redundant, %es (Escape key) makes debug easier. Used iTextUnit=2 may work only for version 8.30, before it was =0

winapp 
program test_mdi1 
implicit none 
include <windows.ins> 

integer      :: i1,i2,i3,i4, ixF, iyF, rslt, main_window, control_panel, display_bar, simulation
integer iT, iTextUnit
integer, external :: empty 

ixF=1100
iyF=1000
iTextUnit=2 ! was 0 before version 8.30

i1=winio@('%ww[no_border]%es&') 
i1=winio@('%ca[Main Window containing an MDI frame]&') 
i1=winio@('%pv%fr%lw',ixF,iyF, main_window) 


iT=winio@('%aw%ww[no_border]%ca[Text Window]%pv%40.8cw', & 
main_window, iTextUnit ) 

i2=winio@('%aw%ww[no_border]%ca[Control Panel]%pv%`^gr[black,user_resize]', & 
main_window, 300,200,control_panel, empty ) 

i3=winio@('%aw%ww[no_border]%ca[Display Bar]%pv%`^gr[white,rgb_colours,user_resize]', & 
main_window, 500,400, display_bar, empty ) 

!i3=winio@('%aw&',main_window)
!i3=winio@('%ww[no_frame]%ca[Display Bar]%pv%`gr[white,metafile_resize]', & 
!200,400,display_bar) 

i4=winio@('%aw%ww[no_border]%ca[Simulation]%pv%`^gr[black,user_resize]', & 
main_window, 800,800, simulation, empty ) 


! Desenha no painel de controle 
rslt=select_graphics_object@(control_panel) 
call draw_filled_ellipse@(100,100,80,80,rgb@(127,59,30)) 

! Desenha na barra de cores 
rslt=select_graphics_object@(display_bar) 
call draw_filled_rectangle@(2,2,398,398,rgb@(255,255,30)) 

! Desenha na área de simulação 
rslt=select_graphics_object@(simulation) 
call draw_filled_rectangle@(10,10,200,200,rgb@(30,255,30)) 
call draw_filled_rectangle@(100,50,120,60,rgb@(255,0,30)) 
call draw_filled_rectangle@(400,400,600,5000,rgb@(30,0,255)) 

!... Text window
Print*, 'This is Text window'

end program test_mdi1


!....................................
integer function empty ()
empty=2
end function
16 Apr 2018 6:03 #21852

Thanks for your help!

16 Apr 2018 10:22 #21853

Noticed that while I made windows resizable the first two windows' surprisingly lost the ability to plot (display_bar and control_panel)? This may take some more swearing to find why.

19 Apr 2018 12:55 #21882

Hell knows, way to many options to try. Needs more swearing time. This is why i use word 'devilry' too often.

21 Apr 2018 10:27 #21903

I took your contribution and now it plots on each screen but still does not work right.

Why handle for each of 3 graphics windows are all the same is a good question. Due to that every time we click on any window the plotting goes to the last screen instead the current one

Here is what i changes in your code:

  1. each callback calls select_graphics_object@ function before doing any drawings. And

  2. the callback does have value 2 not zero at the end, this is default for Clearwin+ . Zero might be used if you want to close window on any click on it

  3. i removed 'implicit none' as it made me nuts and swear louder very quickly asking to declare each and every damn junk variable i introduce like i44 in each and every subroutine. Or requiring to declare each variable in common blocks in all these Functions. To avoid that requires using modules but modules have another bad property: when your code will grow one big module will eventually swallow all others making one huge monopoly which has nothing more but die

We may continue to swear...err...try some more permutations before asking Paul to comment, i have couple other demos which actually worked pretty well switching graphics windows.

winapp 
program test_mdi1 
include <windows.ins> 

integer      :: i1,i2,i3,i4, ixF, iyF, rslt, ihgw_main_window, ihgw_control_panel, ihgw_display_bar, ihgw_simulation 
integer iT, iTextUnit 
integer, external :: draw_control_panel, draw_display_bar, draw_simulation 

common /GR_areas_ids/ihgw_main_window, ihgw_control_panel, ihgw_display_bar, ihgw_simulation 

ixF=1100 
iyF=1000 
iTextUnit=2 ! was 0 before version 8.30 

i1=winio@('%ww[no_border]%es&') 
i1=winio@('%ca[Main Window containing an MDI frame]&') 
i1=winio@('%pv%fr%lw',ixF,iyF, ihgw_main_window) 


iT=winio@('%aw%ww[no_border]%ca[Text Window]%pv%40.8cw', & 
ihgw_main_window, iTextUnit ) 

i2=winio@('%aw%ww[no_border]%ca[Control Panel]%pv%`^gr[black,user_resize]', & 
ihgw_main_window, 300,200,ihgw_control_panel, draw_control_panel ) 

i3=winio@('%aw%ww[no_border]%ca[Display Bar]%pv%`^gr[white,rgb_colours,user_resize]', & 
ihgw_main_window, 500,400, ihgw_display_bar, draw_display_bar ) 

i4=winio@('%aw%ww[no_border]%ca[ihgw_simulation]%pv%`^gr[black,user_resize]', & 
ihgw_main_window, 800,800, ihgw_simulation, draw_simulation ) 

!... Text window 
Print*, 'This is Text window' 

end program test_mdi1 

!.............................................................. 
integer function draw_control_panel () 
include <windows.ins> 
common /GR_areas_ids/ihgw_main_window, ihgw_control_panel, ihgw_display_bar, ihgw_simulation 

i44=select_graphics_object@(ihgw_control_panel)

call draw_filled_ellipse@(100,100,80,80,rgb@(127,59,30)) 

draw_control_panel=2 
end function 

!.............................................................. 
integer function draw_display_bar () 
include <windows.ins> 
common /GR_areas_ids/ihgw_main_window, ihgw_control_panel, ihgw_display_bar, ihgw_simulation 

i44=select_graphics_object@(ihgw_display_bar)

call draw_filled_rectangle@(2,2,398,398,rgb@(255,255,30)) 

draw_display_bar=2
end function 

!.............................................................. 
integer function draw_simulation () 
include <windows.ins> 
common /GR_areas_ids/ihgw_main_window, ihgw_control_panel, ihgw_display_bar, ihgw_simulation 

i44=select_graphics_object@(ihgw_simulation )

call draw_filled_rectangle@(10,10,200,200,rgb@(30,255,30)) 
call draw_filled_rectangle@(100,50,120,60,rgb@(255,0,30)) 
call draw_filled_rectangle@(400,400,600,5000,rgb@(30,0,255)) 

draw_simulation=2 
end function
24 Apr 2018 9:05 #21954

The reason why all the %gr area control handle variables are zero is that is what you set them, by default. Unlike most controls' handles, which RETURN a handle, the handles for a %gr area have to be GIVEN. When I discovered this, some years ago, I wrote a post entitled 'When is a handle not a handle'.

At least, if you specified:

ihgw_control_panel = 10 ihgw_control_bar = 20 ihgw_simulation =30

before starting the Clearwin+ code, then you can determine which area to draw to with select_graphics_area@. As it is written, all three are graphics handle zero!

It may not be the complete answer, but it is part of it.

To summarise: The handle for %gr must be different for each %gr area, and you specify it, it isn't returned from Clearwin+

Eddie

24 Apr 2018 11:20 (Edited: 25 Apr 2018 3:00) #21956

Eddie, You are right. Damn, after some time of not using i always forget that. Paul has to rename this in HELP from 'handle' to 'user-defined number' and stress that if it wasn't already done so. Here is complete text. Must be in extended collection of examples for Clearwin if Silverfrost is interested in increase of compiler users base

winapp 
program test_mdi1 
include <windows.ins> 

integer      :: i1,i2,i3,i4, ixF, iyF, rslt, ihgw_main_window, ihgw_control_panel, ihgw_display_bar, ihgw_simulation 
integer iT, iTextUnit 
integer, external :: draw_control_panel, draw_display_bar, draw_simulation 

common /GR_areas_ids/ihgw_main_window, ihgw_control_panel, ihgw_display_bar, ihgw_simulation 

ixF=1100 
iyF=1000 
iTextUnit=2 ! was 0 before version 8.30 

ihgw_control_panel = 11
ihgw_display_bar   = 12
ihgw_simulation    = 13

i1=winio@('%ww[no_border]%es&') 
i1=winio@('%ca[Main Window containing an MDI frame]&') 
i1=winio@('%pv%fr%lw',ixF,iyF, ihgw_main_window) 


iT=winio@('%aw%ww[no_border]%ca[Text Window]%pv%40.8cw', & 
ihgw_main_window, iTextUnit ) 

i2=winio@('%aw%ww[no_border]%ca[Control Panel]%pv%`^gr[black,user_resize]', & 
ihgw_main_window, 300,200,ihgw_control_panel, draw_control_panel ) 

i3=winio@('%aw%ww[no_border]%ca[Display Bar]%pv%`^gr[white,rgb_colours,user_resize]', & 
ihgw_main_window, 500,400, ihgw_display_bar, draw_display_bar ) 

i4=winio@('%aw%ww[no_border]%ca[ihgw_simulation]%pv%`^gr[black,user_resize]', & 
ihgw_main_window, 800,800, ihgw_simulation, draw_simulation ) 

!... Text window 
Print*, 'This is Text window' 

end program test_mdi1 

!.............................................................. 
integer function draw_control_panel () 
include <windows.ins> 
common /GR_areas_ids/ihgw_main_window, ihgw_control_panel, ihgw_display_bar, ihgw_simulation 

i44=select_graphics_object@(ihgw_control_panel)

call draw_filled_ellipse@(100,100,80,80,rgb@(127,59,30)) 

draw_control_panel=2 
end function 

!.............................................................. 
integer function draw_display_bar () 
include <windows.ins> 
common /GR_areas_ids/ihgw_main_window, ihgw_control_panel, ihgw_display_bar, ihgw_simulation 

i44=select_graphics_object@(ihgw_display_bar)

call draw_filled_rectangle@(2,2,398,398,rgb@(255,255,30)) 

draw_display_bar=2
end function 

!.............................................................. 
integer function draw_simulation () 
include <windows.ins> 
common /GR_areas_ids/ihgw_main_window, ihgw_control_panel, ihgw_display_bar, ihgw_simulation 

i44=select_graphics_object@(ihgw_simulation )

call draw_filled_rectangle@(10,10,200,200,rgb@(30,255,30)) 
call draw_filled_rectangle@(100,50,120,60,rgb@(255,0,30)) 
call draw_filled_rectangle@(400,400,600,5000,rgb@(30,0,255)) 

draw_simulation=2 
end function
25 Apr 2018 12:20 #21957

Many thanks for your help!

25 Apr 2018 6:40 #21960

Paul has to rename this in HELP

I have now made some further changes to try to make this clear.

25 Apr 2018 10:18 #21969

Dan,

It is still a handle. Windows gives you a handle, you give Clearwin+ graphics a handle.

Eddie

Please login to reply.