Hab mir nur gewundert wegen der FehlermeldungenFalko hat geschrieben:Hi, Thomas, hab's mal auf Pb3.94 korrigiert(Ausser den bei dir
)o

Hab mir nur gewundert wegen der FehlermeldungenFalko hat geschrieben:Hi, Thomas, hab's mal auf Pb3.94 korrigiert(Ausser den bei dir
)o
Code: Alles auswählen
Procedure Print_Circle_Text(String$)
If PrintRequester()
If StartPrinting("PureBasic Test")
hDc=StartDrawing(PrinterOutput())
If hDc
PrinterFaktor=2.5; Hier z.B. die Anpassung für den Drucker machen
FrontColor(RGB(0,255,0))
Radius=180 * PrinterFaktor
String$="Purebasic 4 you"
For i=1 To Len(string$)
Zeichen$=Mid(String$,i,1)
Winkel=20 * i
X = Radius*Sin(Winkel/360*2*#PI)
Y = Radius*Cos(Winkel/360*2*#PI)
DrawRText(hDc, PrinterPageWidth()/2+X*PrinterFaktor, PrinterPageHeight()/4+Y*PrinterFaktor,Zeichen$,"Arial",Winkel,40*PrinterFaktor)
Next i
EndIf
StopDrawing()
StopPrinting()
EndIf
EndIf
EndProcedure
Circle_Text("Happy Purebasic4") ; Bild anzeigen
Print_Circle_Text("Happy Purebasic4") ; Bild ausdrucken
Repeat
Event=WaitWindowEvent()
If Event=#PB_EventType_Focus or #PB_Event_MoveWindow:Circle_Text("Happy Purebasic4"):EndIf ; Redraw Windows!
Until Event = #PB_Event_CloseWindow
Code: Alles auswählen
PI.f=3.1415926
Hoehe.l=85 ; 3 cm
Breite.l=85 ; 3 cm
APX.l=71 ; 2,5 cm Ankerpunkt X
APY.l=71 ; 2,5 Ankerpunkt Y
a$=UCase(" Textausrichtung an einem Kreis ")
pdf_Create("P","pt",#PDF_PAGE_FORMAT_A4)
pdf_AddPage()
pdf_SetMargins(0,0,0)
pdf_SetFont("Courier","B",8)
pdf_SetFillColor(255,255,255)
pdf_SetTextColor(128,128,128)
Radius.f=43 ; 1,5 cm
For i=1 To Len(a$)
Zeichen$=Mid(a$,i,1)
Winkel=9 * i
x = Radius*Sin(Winkel/360*2*PI)
y = Radius*Cos(Winkel/360*2*PI)
pdf_SetXY(APX+x,APY-y)
pdf_Rotate(360-Winkel)
pdf_Cell(14,14,Zeichen$,0,0,#PDF_ALIGN_CENTER,0)
Next i
pdf_Save("C:\RotateText1.pdf")
RunProgram("C:\RotateText1.pdf")
Code: Alles auswählen
PI.f=3.1415926
Hoehe.l=85 ; 3 cm
Breite.l=85 ; 3 cm
APX.l=71 ; 2,5 cm Ankerpunkt X
APY.l=71 ; 2,5 Ankerpunkt Y
a$=UCase(" Textausrichtung an einem Kreis ")
pdf_Create("P","pt",#PDF_PAGE_FORMAT_A4)
pdf_AddPage()
pdf_SetMargins(0,0,0)
pdf_SetFont("Courier","B",8)
pdf_SetFillColor(255,255,255)
pdf_SetTextColor(128,128,128)
Radius.f=43 ; 1,5 cm
pdf_SetXY(APX,APY)
For i=1 To Len(a$)
Zeichen$=Mid(a$,i,1)
Winkel=9 * i
x.f = APX+Radius*Sin(Winkel/360*2*PI)
y.f = APY-Radius*Cos(Winkel/360*2*PI)
pdf_SetXY(x,y)
pdf_Rotate(360-Winkel);Winkel)
pdf_Cell(1,1,Zeichen$,0,0,#PDF_ALIGN_CENTER,0) ; Hier steckt der Fehler drinne :D , changed by Falko
Next i
pdf_Save("C:\RotateText1.pdf")
RunProgram("C:\RotateText1.pdf")