Autor Beitrag
Kokel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 79

XP Prof
delphi 2006 Prof.
BeitragVerfasst: Sa 26.02.05 19:02 
Ich möchte in ein bestehendes Bild einen Text einfügen. Dieser Text soll an die Größe des Bildes angepaßt werden. Dazu habe Ich eine Rutine mit einer For schleife Programmiert wo ich über einen Zähler die Schrift Vergrößere . Was aber zu keinem Akzeptablen Ergebnis führte . Ich habe den Fontsize solange erhöht bis Text.Width die Größe meines Eingegeben Wertes erreicht hat. Das ist aber Leider nicht genau der eingestellte Wert.
Font.size:=10 ergibt 100
Font.size:=12 ergibt 120 Bildpunkte Was kann ich tun wenn ich aber genau 105 haben will.
Eine zweite Bitmap anlegen ?
Aber wie bekomme ich das dann transparent in mein Bild Rein.
Könnt Ihr mir Helfen?
Könntet Ihr mir Einen Wink oder einen Link geben? :roll:
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Sa 26.02.05 19:04 
Wink: Canvas.TextWidth, Canvas.TextHeight

AXMD
Kokel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 79

XP Prof
delphi 2006 Prof.
BeitragVerfasst: Sa 26.02.05 19:19 
Kann ich mit CAnvas.TextWidth auch Werte zuweisen? Momentan werte ich die nur aus.
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Sa 26.02.05 19:21 
Kokel hat folgendes geschrieben:
Kann ich mit CAnvas.TextWidth auch Werte zuweisen? Momentan werte ich die nur aus.


Nein, kannst du nicht.

AXMD
Kokel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 79

XP Prof
delphi 2006 Prof.
BeitragVerfasst: Sa 26.02.05 19:26 
JA , dass mach ich Ja bereits , aber ich komme ebend nicht genau auf die Werte , wie ich es bereits oben erwähnt habe. Gibt es vielleicht eine möglichkeit über die GDI . Eine funktion wie Schreibe Text 'BLA BLA',Länge , Breite , Schriftart, Transparent:=True ?
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Sa 26.02.05 19:28 
Schon mal Suche im MSDN TEXTOUT in Zusammenhang mit Suche im MSDN CREATEFONT in Betracht gezogen ;)

AXMD
Kokel Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 79

XP Prof
delphi 2006 Prof.
BeitragVerfasst: Sa 26.02.05 19:34 
This Is All written in English. :shock:
Bat Mei Inglisch Is Werri BAD. 8)
Ich guck mir das mal an und werd mich dann später nochmal melden. :shock: 8)
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Sa 26.02.05 19:36 
Kokel hat folgendes geschrieben:
This Is All written in English. :shock:


Kommt bei englischsprachigen Seiten hin und wieder vor ;)

Kokel hat folgendes geschrieben:
Ich guck mir das mal an und werd mich dann später nochmal melden. :shock: 8)


Do that, we'll help you if necessary ;)

AXMD