From WikiChip
Difference between revisions of "mirc/commands/drawtext"
< mirc‎ | commands

m (Bot: Adding a template)
m (Add -d switch from 7.64)
 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The '''/drawtext command''' draws text at the specified co-ordinates. If you use a negative number for the font size, it will match the size of fonts in the font dialog. The /drawtext command will use some default options for anti-aliasing that you cannot change (yet), meaning that a text drawn in black may not be drawn only using the expected color, this can be a real concern when using [[/drawfill command - mIRC|/drawfill]] to fill an area with text inside it.
+
{{mirc title|/drawtext Command}}
 +
The '''/drawtext command''' draws text at the specified co-ordinates. If you use a negative number for the font size, it will match the size of fonts in the font dialog. The /drawtext command will use some default options for anti-aliasing that you cannot change (yet), meaning that a text drawn in black may not be drawn only using the expected color, this can be a real concern when using {{mIRC|/drawfill}} to fill an area with text inside it.
  
 
== Synopsis ==
 
== Synopsis ==
  /drawtext -hnrpboc <@win> <color> [color] [fontname fontsize] <x y [w h]> <text>
+
  /drawtext -hnrpbocvd <@win> <color> [color] [fontname fontsize] <x y [w h]> <text>
  
 
== Switches ==
 
== Switches ==
 
* '''-p''' - processes and interprets control codes in the text
 
* '''-p''' - processes and interprets control codes in the text
 
* '''-b''' - indicates that you have specified the second color parameter as the background color for the text
 
* '''-b''' - indicates that you have specified the second color parameter as the background color for the text
* '''-o''' - means the specified font should be in bold
 
 
* '''-c''' - means that you have specified the [w h] values as the rectangle in which text should be printed. Text will be clipped if it extends beyond this rectangle
 
* '''-c''' - means that you have specified the [w h] values as the rectangle in which text should be printed. Text will be clipped if it extends beyond this rectangle
 
* '''-h''' - highlights the windows icon if it is minimized
 
* '''-h''' - highlights the windows icon if it is minimized
 
* '''-n''' - prevents the display from being updated immediately
 
* '''-n''' - prevents the display from being updated immediately
 
* '''-r''' - indicates that the colors are in RGB format
 
* '''-r''' - indicates that the colors are in RGB format
 +
* '''-o''' - Attempt to draw the text in bold. A $chr(2) is inserted at the beginning of the string and is interpreted (but the others control codes won't be). If you use -p as well as -o, control code will be interpreted and having a $chr(2) in your text will break the bold.
 +
* '''-i''' - Same as -o but for italic with $chr(29)
 +
* '''-v''' - Draw text from a binvar
 +
* '''-d''' - disable tab support
  
 
== Parameters ==
 
== Parameters ==
Line 26: Line 30:
 
== Compatibility ==
 
== Compatibility ==
 
Added: 5.3
 
Added: 5.3
 
Added On: 13/12/97
 
 
<small>Note: Individual switches were not taken into consideration.</small>
 
  
 
== See also ==
 
== See also ==
 
* [[List of commands - mIRC|List of commands]]
 
* [[List of commands - mIRC|List of commands]]
 
* [[List of identifiers - mIRC|List of identifiers]]
 
* [[List of identifiers - mIRC|List of identifiers]]
* [[$width identifier - mIRC|$width]]
+
* {{mIRC|$width}}
* [[$height identifier - mIRC|$height]]
+
* {{mIRC|$height}}
 
{{mIRC command list}}
 
{{mIRC command list}}
  
[[Category:MIRC commands]]
+
[[Category:mIRC commands|drawtext command - mIRC]]

Latest revision as of 05:19, 31 August 2023

The /drawtext command draws text at the specified co-ordinates. If you use a negative number for the font size, it will match the size of fonts in the font dialog. The /drawtext command will use some default options for anti-aliasing that you cannot change (yet), meaning that a text drawn in black may not be drawn only using the expected color, this can be a real concern when using /drawfill to fill an area with text inside it.

Synopsis[edit]

/drawtext -hnrpbocvd <@win> <color> [color] [fontname fontsize] <x y [w h]> <text>

Switches[edit]

  • -p - processes and interprets control codes in the text
  • -b - indicates that you have specified the second color parameter as the background color for the text
  • -c - means that you have specified the [w h] values as the rectangle in which text should be printed. Text will be clipped if it extends beyond this rectangle
  • -h - highlights the windows icon if it is minimized
  • -n - prevents the display from being updated immediately
  • -r - indicates that the colors are in RGB format
  • -o - Attempt to draw the text in bold. A $chr(2) is inserted at the beginning of the string and is interpreted (but the others control codes won't be). If you use -p as well as -o, control code will be interpreted and having a $chr(2) in your text will break the bold.
  • -i - Same as -o but for italic with $chr(29)
  • -v - Draw text from a binvar
  • -d - disable tab support

Parameters[edit]

  • <@win> - the window's name
  • <color> - the foreground color
  • [color] - the background color, if -b has been specified
  • [fontname fontsize] - the name of the font and the size of the font
  • <x y [w h]> - the coordinate of the text
  • <text> - the text to be drawn

Example[edit]

drawtext -rn @mygame 0 verdana 20 30 30 the fps is: 60

Compatibility[edit]

Added: 5.3

See also[edit]

v · d · e mIRC commands list

A /abook, /action, /add, /ajinvite, /alias, /aline, /ame, /amsg, /anick, /aop, /auser, /auto, /autojoin, /avoice, /away

B /background, /ban, /bcopy, /beep, /bindip, /bread, /break, /breplace, /bset, /btrunc, /bunset, /bwrite

C /channel, /clear, /clearall, /clearial, /cline, /clipboard, /close, /closechats, /closedccs, /closefserves, /closemsg, /cnick, /color, /colour, /comclose, /comlist, /commands, /comopen, /comreg, /continue, /copy, /creq, /ctcp, /ctcpreply, /ctcps

D /dcc, /dccserver, /dde, /ddeserver, /debug, /dec, /describe, /dialog, /did, /didtok, /disable, /disconnect, /dlevel, /dline, /dll, Template:mIRC/donotdisturb, /dns, /dqwindow, /drawcopy, /drawdot, /drawfill, /drawline, /drawpic, /drawrect, /drawreplace, /drawrot, /drawsave, /drawscroll, /drawsize /drawtext

E /ebeeps, /echo, /editbox, /else, /elseif, /emailaddr, /enable, /events, /exit

F /fclose, /filter, /findtext, /finger, /firewall, /flash, /flist, /flood, /flush, /flushini, /fnord, /font, /fopen, /fseek, /fsend, /fserve, /fullname, /fupdate, /fwrite

G /ghide, /gload, /gmove, /gopts, /goto, /gplay, /gpoint, /gqreq, /groups, /gshow, /gsize, /gstop, /gtalk, /gunload, /guser

H /hadd, /halt, /haltdef, /hdec, /hdel, /help, /hfree, /hinc, /hload, /hmake, /hotlink, /hop, /hsave

I /ial, /ialclear, /ialmark, /identd, /if, /ignore, /iline, /inc, /iuser

J /join

L /leave, /linesep, /links, /list, /load, /loadbuf, /localinfo, /log, /logview

M /maxdepth, /mdi, /me, /menubar, /mkdir, /mnick, /mode, /msg

N /noop, /notice, /notify

O /onotice, /omsg

P /pareline, /part, /partall, /pdcc, /perform, /play, /playctrl, /pop, /protect, /proxy, /pvoice

Q /qme, /qmsg, /query, /queryrn, /quit, /quote

R /raw, /registration, /reload, /remini, /remote, /remove, /rename, /renwin, /reseterror, /resetidle, /return, /returnex, /rlevel, /rline, /rmdir, /run, /ruser

S /save, /savebuf, /saveini, /say, /scid, /scon, /server, /set, /setlayer, /showmirc, /signal, /sline, /sockaccept, /sockclose, /socklist, /socklisten, /sockmark, /sockopen, /sockpause, /sockread, /sockrename, /sockudp, /sockwrite, /sound, /speak, /splay, /sreq, /strip, /switchbar

T /timer, /timestamp, /tip, /tips, /titlebar, /tnick, /tokenize, /toolbar, /topic /tray, /treebar

U /ulist, /unload, /unset, /unsetall, /updatenl, /url, /username, /uwho

V /var, /vcadd, /vcmd, /vcrem, /vol

W

X /xyzzy