Autor Beitrag
Flamefire
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Mi 09.05.07 13:15 
Ich möchte auf einer Bitmap ein Captcha-Code (SicherheitsCode) erstellen.

Nix kompliziertes...erst mal nur ein einziges zeichen ein wenig verwursteln:
Wie kann ich einen Buchstaben mit verschiedenen Styles (kursiv, fett...) auf eine BM zeichnen?
Das ist schon alles ^^
Danniolo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 693



BeitragVerfasst: Mi 09.05.07 13:19 
Moin,

wie wäre es mit Canvas.Font ?
Karlson
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 2088



BeitragVerfasst: Mi 09.05.07 14:04 
Du kannst mit Canvas.Font einstellen welche Schriftart es sein solll. Mit Canvas.Font.Style:=[fsbold, fsitalic] wäre dein Buchstabe zudem kursiv und fett. Mit Canvas.Textout(x,y,'Text') zeichnest du den oder die Buchstaben dann auf die Leinwand.

lg.
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Fr 11.05.07 00:17 
Zudem kannst Du mit CreateFont auch rotierte Font's erzeugen (Das Ergebnis von CreateFont an Canvas.Font.Handle zuweisen). Außerdem kannst Du auch eine zufällige Aufhellung oder Abdunklung des Bilder erzeugen (rauschen) oder einzelne Zeilen\Spalten nach links\oben oder rechts\unten verschieben... Weiterhin beliebt sind auch Linien oder andere Formen über deinem Bild.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.