mIRC Home    About    Download    Register    News    Help

Print Thread
Add [X Y W H] to /drawsave #152683 04/07/06 05:14 PM
Joined: Oct 2005
Posts: 21
P
poiuy_qwert Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Oct 2005
Posts: 21
/drawsave should have the optional [X Y W H] parameters(/drawsave -bNqN @ [X Y W H] <filename>), so that you can save a region of a windows background to a file. This can be done with /drawcopy and /drawsave but that needs a lot of extra lines to get the job done. My problem is that the width of the part of the window I want to save is, is smaller than the the smallest a window goes. This means even if I draw the part out of one window into the other, I will allways have extra stuff to the right of it. This was a bad explenation so for an example, i want to save a rect 20x20 in the top left corner of @test, to save.bmp:
Code:
alias test {
  window -pdCf @test 0 0 100 100
  drawrect -rf @test 255 1 10 10 80 80
  window -pdCf @save 0 0 20 20
  drawcopy @test 0 0 20 20 @save 0 0
  drawsave @save save.bmp
  window -c @test
  window -c @save
}

If you run this then check the bmp, you will know what I mean.

Re: Add [X Y W H] to /drawsave #152684 05/07/06 02:52 AM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
FYI, you can create a window of any size by using +switches to remove the titlebar, e.g. /window -pB +d @test -1 -1 10 10


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Re: Add [X Y W H] to /drawsave #152685 05/07/06 10:17 AM
Joined: Apr 2004
Posts: 759
M
Mpdreamz Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
Knowing poiuy i reckon he knows about the + switches.
I agree that drawsave regions would be a nice feature and much more direct then opening a 2nd window.


$maybe