Mittelschrift

Previous topic - Next topic

WPShadow

Hi!

Ich würde gerne die Schrift in die Mitte von einem (gezeichneten) Feld bekommen, aber ich bekomme nicht raus, wie das gehen könnte.

Hat es da nicht irgendein Demo gegeben, das das mal konnte? Ich finde es leider nicht...  ;/

Wäre schön, wenn mir jemand helfen könnte!

GLG

W.
AMD X2 4600, 2 GB Ram, ATI X1950 XTX, XP PRO SP2: GLB Premium 10.beta_dingsi, <(´.´<) Kirby Dance (>`.`)>
http://lostrevenant.blogspot.com
alea iacta est

Schranz0r

Code (glbasic) Select
LOCAL rx1, rx2, ry1, ry2, fx, fy, title$

title$ = "Testeintrag"
rx1 = 200
ry1 = 400
rx2 = 100
ry2 = 25

GETFONTSIZE fx,fy


WHILE TRUE


DRAWRECT rx1, ry1, rx2, ry2, RGB(0x00, 0xff, 0x00)
PRINT title$, rx1+rx2/2-fx*(LEN(title$)/2), ry1+ry2/2-fy/2

SHOWSCREEN
WEND
END


Fauler Sack!  :whistle:
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

Moru

For centering or right-align text or even full justify, look at PeeJays Proportional font tool. I have a mirror on my homepage with the color changes I made:

http://gamecorner.110mb.com/code.php (Bitmap font)

WPShadow

Have it, great, thank you!!!
AMD X2 4600, 2 GB Ram, ATI X1950 XTX, XP PRO SP2: GLB Premium 10.beta_dingsi, <(´.´<) Kirby Dance (>`.`)>
http://lostrevenant.blogspot.com
alea iacta est