drawing_20text_20with_20a_20translucent_20dropshadow
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
drawing_20text_20with_20a_20translucent_20dropshadow [2018/03/31 13:19] – external edit 127.0.0.1 | drawing_20text_20with_20a_20translucent_20dropshadow [2024/01/05 00:22] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
=====Drawing text with a translucent dropshadow===== | =====Drawing text with a translucent dropshadow===== | ||
- | //by Richard Russell, October 2007//\\ \\ It is straightforward to draw text with an //opaque// dropshadow: you simply draw the ' | + | //by Richard Russell, October 2007//\\ \\ It is straightforward to draw text with an //opaque// dropshadow: you simply draw the ' |
+ | |||
+ | <code bb4w> | ||
PROCdrawshadowedtext(" | PROCdrawshadowedtext(" | ||
- | Here **xpos%** and **ypos%** are the position in which the text should be drawn (in BBC BASIC graphics coordinates) and **colour%** is the required foreground text colour represented by the hexadecimal value "& | + | </ |
+ | |||
+ | Here **xpos%** and **ypos%** are the position in which the text should be drawn (in BBC BASIC graphics coordinates) and **colour%** is the required foreground text colour represented by the hexadecimal value "& | ||
* DT_EXPANDTABS (&40) Expands tab characters; the default column width is 8. | * DT_EXPANDTABS (&40) Expands tab characters; the default column width is 8. | ||
* DT_NOPREFIX (&800) Disables special processing of the **&** character. | * DT_NOPREFIX (&800) Disables special processing of the **&** character. | ||
- | \\ | + | |
+ | The text can consist of two or more lines, separated by CRLF (**CHR$13+CHR$10**) sequences: | ||
+ | |||
+ | <code bb4w> | ||
text$ = "First line" | text$ = "First line" | ||
PROCdrawshadowedtext(text$, | PROCdrawshadowedtext(text$, | ||
- | Here is the procedure. It requires Windows 98 or later (it will not run under Windows 95):\\ \\ | + | </ |
+ | |||
+ | Here is the procedure. It requires Windows 98 or later (it will not run under Windows 95): | ||
+ | |||
+ | <code bb4w> | ||
DEF PROCdrawshadowedtext(text$, | DEF PROCdrawshadowedtext(text$, | ||
LOCAL msimg32%, hang%, hdc%, hbm%, old%, bits%, delta%, max%, P%, f, b | LOCAL msimg32%, hang%, hdc%, hbm%, old%, bits%, delta%, max%, P%, f, b | ||
Line 84: | Line 95: | ||
SYS " | SYS " | ||
ENDPROC | ENDPROC | ||
+ | </ |
drawing_20text_20with_20a_20translucent_20dropshadow.1522502358.txt.gz · Last modified: 2024/01/05 00:18 (external edit)