mIRC Homepage

picwin and command improvements

Posted By: FroggieDaFrog

picwin and command improvements - 06/05/10 11:43 AM

/window
if the window size(x y w h) is specifed, even if the window is opened in the mdi, i'd be nice if it retained the set w,h whether the mdi windows are maximized or not. Currently, the only way to achieve this is with a dll, or set it to a desktop window.

/drawline
1) currently if you use drawline it draws line from xy to xy to xy, etc. Would be nice if by adding a comma between xy's it would break from the current line and start a new one.
2) a switch to fill inside the drawn lines with a specified color. To help this, if the last xy doesn't equal the first, it automatically draws the "finishing" line

/drawrect
1) currently the -f switch fills it the rectangle/ellipse with the same color as the outline. I'd like to see a switch that lets u set a diffrent inside color from the outside; in essenses a way to set the border color and the fill color.

/drawtext
1) Currently, everytime u want to draw text, u have to use a diffrent command, even if u want to use the same color, width, height, font, and font size. I'd like to be able to just specify the diffrent xy's and text be cammas.

[new] $MouseIsIn(@windowname,x,y,w,h,curvedegree)
returns $true or $false if the mouse is in @window and within the rectangle/ellipes specified.
would cut down on alot of "if ($mouse.x isnum x-x2 && $mouse.y isnum y-y2)" or worse the "if (-calc for circle-)"

I understand that most of these are easily self-scripted, but i've seen them used over and over in picwins and would make picwin scripting alot easier.
Posted By: Ook

Re: picwin and command improvements - 08/05/10 07:46 PM

Originally Posted By: FroggieDaFrog

/drawline
1) currently if you use drawline it draws line from xy to xy to xy, etc. Would be nice if by adding a comma between xy's it would break from the current line and start a new one.


This would be very usefull.

Originally Posted By: FroggieDaFrog

2) a switch to fill inside the drawn lines with a specified color. To help this, if the last xy doesn't equal the first, it automatically draws the "finishing" line


Like a /drawpoly command.

Originally Posted By: FroggieDaFrog

[new] $MouseIsIn(@windowname,x,y,w,h,curvedegree)
returns $true or $false if the mouse is in @window and within the rectangle/ellipes specified.
would cut down on alot of "if ($mouse.x isnum x-x2 && $mouse.y isnum y-y2)" or worse the "if (-calc for circle-)"


This is already in the help file:

$inellipse(x,y,x,y,w,h)
Returns $true if the point x y is inside the specified ellipse, and $false if it isn't.

$inrect(x,y,x,y,w,h)
Returns $true if the point x y is inside the specified rectangle, and $false if it isn't.

$inroundrect(x,y,x,y,w,h,w,h)
Returns $true if the point x y is inside the specified rounded rectangle, and $false if it isn't.

$inpoly(x,y,a1,a2,b1,b2,...)
Returns $true if the point x y is inside the polygon defined by the specified points, and $false if it isn't.
Posted By: FroggieDaFrog

Re: picwin and command improvements - 08/05/10 08:31 PM

just realised how long it's been sense I've read the helpfile and how many versions ago it was. Thank you smile

/drawpoly goodname for it too smile
Posted By: Knoeki

Re: picwin and command improvements - 06/08/10 03:20 PM

I know this is an old thread, but I for one would love a /drawpoly command. Especially if we'd be able to also use the -f switch to fill the area. Would be very helpful with coding filled vectors and such ;_)
Posted By: FroggieDaFrog

Re: picwin and command improvements - 06/08/10 03:31 PM

Actually. I'm working on an alias for /drawpoly

If you stick to the rules of what makes a polygon a polygon then it isn't that hard:

a) It must be a closed figure
b) No sides/lines can intersect
c) No lines may curve

simple as drawing the figures border then doing a border fill.
Posted By: Knoeki

Re: picwin and command improvements - 09/08/10 01:18 AM

Originally Posted By: FroggieDaFrog
Actually. I'm working on an alias for /drawpoly

If you stick to the rules of what makes a polygon a polygon then it isn't that hard:

a) It must be a closed figure
b) No sides/lines can intersect
c) No lines may curve

simple as drawing the figures border then doing a border fill.


Oh, I never said it's *hard*, it's just that I personally find it a worthy addition to the /draw* commands available... not to mention the speed improvement of having one command vs. using several commands to do the same thing ;_)
© 2019 mIRC Discussion Forums