2 registered members (Ayumi, 1 invisible),
584
guests, and 1
spider. |
Key:
Admin,
Global Mod,
Mod
|
|
|
draw_text_outline | Usefull function
#245105
01/08/09 13:03
01/08/09 13:03
|
Joined: Feb 2008
Posts: 337
Vadim647
OP
Senior Member
|
OP
Senior Member
Joined: Feb 2008
Posts: 337
|
I was supposed to post it in november\december 2008, but I forgot about it. So, ^The screenshot
function draw_text_outline(x,y,STRING* str, VECTOR* color)
{
draw_text(str,x-1,y,nullvector);
draw_text(str,x+1,y,nullvector);
draw_text(str,x,y-1,nullvector);
draw_text(str,x,y+1,nullvector);
draw_text(str,x,y,color);
}
^ The function code C&C?
I switched to other account since marth 2010. Guess which.
|
|
|
Re: draw_text_outline | Usefull function
[Re: Vadim647]
#245106
01/08/09 13:18
01/08/09 13:18
|
Joined: Oct 2007
Posts: 5,210 Ä°stanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
|
nice one. you can make outlines for TEXTs but this is indeed usefull too. Btw colored outline would be:
function draw_text_outline_coloe(x,y,STRING* str, VECTOR* color,VECTOR* outline_color)
{
draw_text(str,x-1,y,outline_color);
draw_text(str,x+1,y,outline_color);
draw_text(str,x,y-1,outline_color);
draw_text(str,x,y+1,outline_color);
draw_text(str,x,y,color);
}
3333333333
|
|
|
Re: draw_text_outline | Usefull function
[Re: Cowabanga]
#245151
01/08/09 16:21
01/08/09 16:21
|
Joined: Feb 2008
Posts: 337
Vadim647
OP
Senior Member
|
OP
Senior Member
Joined: Feb 2008
Posts: 337
|
@Quadraxas: Yeah, that was original function. Just to say the most of time you don't need the colored outline.
I switched to other account since marth 2010. Guess which.
|
|
|
Re: draw_text_outline | Usefull function
[Re: Vadim647]
#245206
01/08/09 20:57
01/08/09 20:57
|
Joined: Mar 2002
Posts: 1,774 Magdeburg
FlorianP
Serious User
|
Serious User
Joined: Mar 2002
Posts: 1,774
Magdeburg
|
function draw_text_outline_color(var x,var y,STRING* str, VECTOR* color,VECTOR* outline_color, var outline_size)
{
var i, j;
for (i = x - outline_size; i <= x + outline_size; i++)
{
for (j = y - outline_size; j <= y + outline_size; j++)
{
draw_text(str, i, j, outline_color);
}
}
draw_text(str,x,y,color);
}
Nice idea... This one is for a specific outline size.
I <3 LINQ
|
|
|
Re: draw_text_outline | Usefull function
[Re: Joozey]
#245661
01/11/09 01:51
01/11/09 01:51
|
Joined: Jul 2004
Posts: 1,710
MMike
Serious User
|
Serious User
Joined: Jul 2004
Posts: 1,710
|
what about a ... glow text effect? making the alpha color getting more transparent.. maybe? edit: oh neve draw text don't allow the alpha parameter
Last edited by MMike; 01/11/09 02:03.
|
|
|
Re: draw_text_outline | Usefull function
[Re: MMike]
#245663
01/11/09 01:55
01/11/09 01:55
|
Joined: Mar 2008
Posts: 2,247 Baden Württemberg, Germany
Espér
Expert
|
Expert
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
|
hmmm.. i think this should work with alpha... Is it possible like that?:
pointer = draw_text(str,x-1,y,color_vector);
pointer.alpha = 50;
If yes.. glow effect should be easy
|
|
|
Re: draw_text_outline | Usefull function
[Re: MMike]
#245666
01/11/09 02:27
01/11/09 02:27
|
Joined: Jul 2004
Posts: 1,710
MMike
Serious User
|
Serious User
Joined: Jul 2004
Posts: 1,710
|
|
|
|
|