forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

What this program gives you ?

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
DanRRight



Joined: 10 Mar 2008
Posts: 2816
Location: South Pole, Antarctica

PostPosted: Wed Jul 29, 2015 11:08 am    Post subject: What this program gives you ? Reply with quote

Guessing if this is my hardware/software rig problem or compiler bug. Please check what color do you get when step with the mouse on vertical line?
Code:

module com222

   use mswin   
   implicit none 
   integer ::hwnd
   integer , dimension(4) ::rect
   integer ir, ig, ib, iRGBvalue         
   integer ix, iy, iflags
contains                       
   
   integer function draw_func()
      logical :: dummy     
      dummy = GetWindowRect(hwnd,rect) 
      if (.not.dummy) stop
      call draw_line@(  0, 100, 200, 100, rgb@(253,0,0))   
      call draw_line@(100,   0, 100, 200, rgb@(252,0,0))     
      draw_func = 2
   end function draw_func 
 
 !.................................................

   integer function PixelsPosAndRGB ()
       call get_mouse_info@(ix, iy, iflags)
       call GET_RGB_VALUE@( ix, iy, iRGBvalue )
       ir = and (iRGBvalue,255)
       ig = and (rs(iRGBvalue,8),255)
       ib = rs  (iRGBvalue,16)
       call window_update@(ir)
       call window_update@(ig)
       call window_update@(ib)
       call window_update@(ix)
       call window_update@(iy)
   PixelsPosAndRGB = 2
   end function
end module com222
!      *******************************************
!      *            Main Program                 *
!      *******************************************
winapp
program badRGB
   use mswin

   use com222
   implicit none
   integer :: ctrl,i
   ctrl = 0
   i = winio@('%ca[ Find RGB color]&')               
   i = winio@('%ww Find RGB of vertical red line  %2nl%es&')
   i = winio@('%sc&',draw_func)       
!   i = winio@('%mi[icon_1]&')   
   i = winio@('ir         ig        ib           posX, posY &
       &%ff%4rd%4rd%4rd  %4rd%4rd%ff&', ir,ig,ib, ix,iy)
   i = winio@('%pv%^gr[black, full_mouse_input, rgb_colours]&',200,200, PixelsPosAndRGB)
   i = winio@('%mn[&File[E&xit]]&','EXIT')     

   i = winio@('%lw%hw',ctrl,hwnd)
end program
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Wed Jul 29, 2015 2:01 pm    Post subject: Reply with quote

(253,0,0) on the horizontal line, and (252,0,0) on the vertical line including where the lines cross.

Eddie
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2816
Location: South Pole, Antarctica

PostPosted: Wed Jul 29, 2015 9:34 pm    Post subject: Reply with quote

Thanks, Eddie. What is your compiler version?

I changed two things - the 7.10 to 7.20 for compiler and 2K to 4K for monitor. As a result these color I get by pointing before vertical lines almost 10 pixels to the left where mouse steps on the blacks. Horizontal lines are determined fine. Actually I made three changes, I changed mouse pointer shape from default.

One other small thing is that cursor position in text editor is 1 pixel to the left when you highlight the text.

The program above is quick modification of Silverfrost example Resize.f95

UPDATE: No, this is not a FTN95 bug. When i turn monitor into 30 Hz mode from 60, all positions are OK
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Thu Jul 30, 2015 10:04 am    Post subject: Reply with quote

Hi Dan,

Apologies for slow reply - it's a time zone thing. I tried it on 7.20PE on a small laptop with 1366x768 resolution and an Intel graphics chip.

My guess? It's a dpi thing, and yet another bear trap created by Microsoft.

Eddie
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2816
Location: South Pole, Antarctica

PostPosted: Thu Jul 30, 2015 1:00 pm    Post subject: Reply with quote

Thanks, Eddie, for the tries, they are my last hairs saviors.
I suspect here is a chroma compression issue. Which means that no other solution exists besides changing of graphics card which must be updated to the latest ones supporting full 4:4:4 chroma transfer over HDMI 2.0 at 60Hz.

As to the Microsoft trap, one such really exists here. Every time i switch monitor off, i must follow the procedure to hibernate the computer first and follow opposite procedure when go back. Otherwise all my open applications go to the left upper corner and decrease in size. No one in years found reliable solution how to trick Windows. This is because i moved few days ago to just the regular 4K TV instead of bunch dedicated PC monitors. Tired to search one bug for the whole week and making new ones on small screens. There are no dedicated 4K 50-55" PC monitors yet, but the 4K TVs are here and becoming cheap for such sizes. They are way better then any smaller size dedicated PC 4K monitors due to its right size. The key moment here is that only 50+ inch sizes allow to run applications without dumb DPI scaling. Who would think that we will end up with such gargantuan screens? Kids by the way already actively switching on 4K TVs as game monitors.

After i solve these dumb problems i'll recommend to move to 4K for everyone, the boring sometimes programming gets a charm boost.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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