Mirage Source http://www.miragesource.net/forums/ |
|
drawing outlined text http://www.miragesource.net/forums/viewtopic.php?f=210&t=1037 |
Page 1 of 1 |
Author: | one [ Tue Jan 02, 2007 10:19 pm ] |
Post subject: | drawing outlined text |
i've seen this quite often, but cant figure out how to do this heres a screenshot of godborn, so you can see what i mean http://img119.imageshack.us/img119/3789 ... t29jb3.png |
Author: | Matt [ Tue Jan 02, 2007 10:30 pm ] |
Post subject: | |
Replace your "Sub DrawText" with this: Code: Public Sub DrawText(ByVal hdc As Long, ByVal X, ByVal Y, ByVal Text As String, Color As Long)
Call SelectObject(hdc, GameFont) Call SetBkMode(hdc, vbTransparent) Call SetTextColor(hdc, RGB(50, 50, 50)) Call TextOut(hdc, X - 1, Y - 1, Text, Len(Text)) Call TextOut(hdc, X + 1, Y - 1, Text, Len(Text)) Call TextOut(hdc, X - 1, Y + 1, Text, Len(Text)) Call TextOut(hdc, X + 1, Y + 1, Text, Len(Text)) Call SetTextColor(hdc, Color) Call TextOut(hdc, X, Y, Text, Len(Text)) End Sub |
Author: | one [ Tue Jan 02, 2007 10:53 pm ] |
Post subject: | |
thank you :> |
Author: | Tony [ Tue Jan 02, 2007 11:08 pm ] |
Post subject: | |
This was pretty easy to do, took a while for me to find out what did what but then I got a hold of it quickly. :: Pando |
Author: | one [ Wed Jan 03, 2007 12:06 am ] |
Post subject: | |
jeah, im just not creative enuogh x) but wouldnt it be better to make it like this? Code: Call TextOut(hDC, x - 1, y, Text, Len(Text))
Call TextOut(hDC, x + 1, y, Text, Len(Text)) Call TextOut(hDC, x, y - 1, Text, Len(Text)) Call TextOut(hDC, x, y + 1, Text, Len(Text)) this works better for me there where some pixels missing with your method, and it looked horrible with some fonts. |
Author: | Matt [ Wed Jan 03, 2007 12:15 am ] |
Post subject: | |
W/e works. |
Author: | Tony [ Wed Jan 03, 2007 8:12 am ] |
Post subject: | |
one wrote: jeah, im just not creative enuogh x) but wouldnt it be better to make it like this? Code: Call TextOut(hDC, x - 1, y, Text, Len(Text)) Call TextOut(hDC, x + 1, y, Text, Len(Text)) Call TextOut(hDC, x, y - 1, Text, Len(Text)) Call TextOut(hDC, x, y + 1, Text, Len(Text)) this works better for me :) there where some pixels missing with your method, and it looked horrible with some fonts. Not method T.T Code: Call TextOut(HDC, X + 1, Y + 0, Text, Len(Text))
Call TextOut(HDC, X + 0, Y + 1, Text, Len(Text)) Call TextOut(HDC, X + 1, Y + 1, Text, Len(Text)) Call TextOut(HDC, X - 1, Y - 0, Text, Len(Text)) Call TextOut(HDC, X - 0, Y - 1, Text, Len(Text)) Call TextOut(HDC, X - 1, Y - 1, Text, Len(Text)) Thats how I do it... :: Pando |
Author: | lordgivemick [ Thu Jan 04, 2007 1:25 pm ] |
Post subject: | |
ya you could code it but there are some types of text suff out there that coded would slow it down so i would suggest useing pixia or an art program finding your fonts copying on changeing it putting it into your games gui or what ever folder. wallaa its your own style of lettering. no eat your spegetti its getting cold. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |