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! )
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