mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2013
Posts: 87
I
Iire Offline OP
Babel fish
OP Offline
Babel fish
I
Joined: Aug 2013
Posts: 87
If something is drawn to a picture window, and the window is resized to a point where what was drawn is no longer completely visible, $window() .bw and/or .bh property/ies (whichever is applicable) don't update properly... The .w/.h and .dw/.dh properties do, however...

Code:
//tokenize 32 W/H = $!window(@test).w $!window(@test).h : DW/DH = $!window(@test).dw $!window(@test).dh : BW/BH = $!window(@test).bw $!window(@test).bh | window -dfop @test -1 -1 200 200 | drawrect @test 2 1 0 0 10 200 | echo -ga $($1-,2) | window -f @test -1 -1 200 100 | echo -ga $($1-,2)


Manually resizing the window and alternating between a size smaller than what's drawn and a size equal to or more than what's drawn, (I really hope that makes sense, not sure how else to word it), produces even stranger behavior: the applicable property/ies will gradually increase each time (usually by one).

Note that clearing the window does not fix the issue.
Btw this is in mIRC v7.32 on Windows 7 32 bit

Joined: Jul 2006
Posts: 4,022
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,022
That's not a bug, it's on purpose: mIRC keeps track of where you're drawing regardless of the size of the window and the bitmap area is increased if needed


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Aug 2013
Posts: 87
I
Iire Offline OP
Babel fish
OP Offline
Babel fish
I
Joined: Aug 2013
Posts: 87
Ah yeah, that makes sense...

What about the gradual increase upon back and forth resizing like I (attempted to) described in my first post?

Joined: Jul 2006
Posts: 4,022
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,022
In your one liner, BH is the same before and after the draw because /window -f works on the display area (DW/DH), which affects the real size of the window (W/H), but not the bitmap area (BW/BH). Basically, the bitmap area is never being made smaller, I think -f also sets the bitmap area if the size is not smaller than the current size.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard