DrawingFont()
Syntaxe
DrawingFont(PoliceID)Description
Change la police de caractères de la surface de dessin en cours.
Arguments
PoliceID Le numéro d'identification de la police à utiliser.
Il peut être obtenu par la fonction FontID() de la bibliothèque 'Font'.
Remarques
Tous les textes affichés ensuite le seront avec cette nouvelle police.
Avant d'utiliser cette fonction, la police doit être chargée à l'aide de la fonction LoadFont().
Exemple
If OpenWindow(0, 0, 0, 200, 200, "DrawingFont", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) Police = LoadFont(0, "Arial", 20, #PB_Font_Underline) If CreateImage(0, 200, 200) And StartDrawing(ImageOutput(0)) DrawText(50,30,"PUREBASIC", RGB(255, 255, 0)) DrawingFont(Police) DrawText(5,80,"PUREBASIC", RGB(255, 255, 0)) StopDrawing() ImageGadget(0, 0, 0, 200, 200, ImageID(0)) EndIf Repeat Event = WaitWindowEvent() Until Event = #PB_Event_CloseWindow EndIf
Voir aussi
LoadFont(), FontID()
OS Supportés
Tous