Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Ayumi, 1 invisible), 584 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
draw_text_outline | Usefull function #245105
01/08/09 13:03
01/08/09 13:03
Joined: Feb 2008
Posts: 337
V
Vadim647 Offline OP
Senior Member
Vadim647  Offline OP
Senior Member
V

Joined: Feb 2008
Posts: 337
I was supposed to post it in november\december 2008, but I forgot about it. So,

^The screenshot
Code:
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 Offline
Senior Expert
Quad  Offline
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:

Code:
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: Vadim647] #245107
01/08/09 13:18
01/08/09 13:18
Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Cowabanga Offline
Expert
Cowabanga  Offline
Expert

Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
AWESOME!! Good work Vadim smile.

Re: draw_text_outline | Usefull function [Re: Cowabanga] #245151
01/08/09 16:21
01/08/09 16:21
Joined: Feb 2008
Posts: 337
V
Vadim647 Offline OP
Senior Member
Vadim647  Offline OP
Senior Member
V

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
F
FlorianP Offline
Serious User
FlorianP  Offline
Serious User
F

Joined: Mar 2002
Posts: 1,774
Magdeburg
Code:
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: FlorianP] #245459
01/10/09 01:10
01/10/09 01:10
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
Nice trick smile


Click and join the 3dgs irc community!
Room: #3dgs
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 Offline
Serious User
MMike  Offline
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 frown

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 Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
hmmm..
i think this should work with alpha...
Is it possible like that?:

Code:
pointer = draw_text(str,x-1,y,color_vector);
pointer.alpha = 50;


If yes.. glow effect should be easy


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: draw_text_outline | Usefull function [Re: Espér] #245664
01/11/09 02:17
01/11/09 02:17
Joined: Jul 2004
Posts: 1,710
MMike Offline
Serious User
MMike  Offline
Serious User

Joined: Jul 2004
Posts: 1,710
pointer is not member of function... thats the error i got.

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 Offline
Serious User
MMike  Offline
Serious User

Joined: Jul 2004
Posts: 1,710
i got a way ehhe

Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1