mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2006
Posts: 4,149
W
Wims Offline OP
Hoopy frood
OP Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
/Drawcopy/drawpic are nice and all but when you want to copy non squared portion of a picture window, well that's just impossible.

The idea is that I wanted to make a 2d game where a player move in a dark room with no light except a flashlist, so some 45° angles in front of the player showing the map while the rest is dark. Discussing this idea with Saturn revealed that some technique to do that in a good way is entirely possible, however for the different features/gameplay of the game, it would then make it harder if not impossible. Having this on drawcopy would be just awesome and allow for very smooth things.

It could be implemented with /drawcopy and /drawpic with a new switch but a new command is fine too.

Current: /drawcopy -ihmnt @ [color] <x y w h> @ <x y [w h]>

With a new -s switch, it would become : /drawcopy -sihmnt @ [color] x1 y1 x2 y2 xN yN ... @ x y

That way it's possible to copy a triangle.

I believe that currently, drawcopy makes it so the top left of the copied square is at the x y coordinates. For non squared copy it could be tricky, weird polygons could be copied with no real good way to choose a way to display it.
Maybe making it so the first coordinates of the polygon passed (x1 y1) is at the x y coordinates.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Apr 2004
Posts: 871
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 871
Highly related and as an outcome of the same discussion, I'd like to suggest a new switch to /drawline which fills the resulting lines as a polygon. That would be helpful for drawing both simple and complex shapes, without having to figure out how to use /drawfill on them. There are apparently Polygon() and SetPolyFillMode() GDI functions - maybe they can be used for the implementation. In fact, with this extension, Ouims's /drawcopy suggestion can also be implemented by means of scripting, using masks. On the other hand, direct polygon support in /drawcopy would be pretty neat, too.


Saturn, QuakeNet staff

Link Copied to Clipboard