Code:
'PBCC4 program #COMPILE EXE #REGISTER NONE 'no need for include files for the graphic statements alone. 'polygon type defs as outlined in help TYPE PolyPoint x AS SINGLE y AS SINGLE END TYPE TYPE PolyArray count AS LONG xy(1 TO 1024) AS PolyPoint END TYPE FUNCTION PBMAIN () AS LONG DIM pi AS EXT pi=3.1415926535 'not used in this program '************************************* 'create and attach the graphic window '************************************* GRAPHIC WINDOW "Graphics", 100, 100, 400, 400 TO hWin??? GRAPHIC ATTACH hWin???, 0 DIM MyPolygon AS PolyArray MyPolygon.count=3 'specify 3 points in this polygon '************************************* 'set the polygon points for my arrow '(filled triangle) '************************************* MyPolygon.xy(1).x=100 MyPolygon.xy(1).y=100 MyPolygon.xy(2).x=100 MyPolygon.xy(2).y=200 MyPolygon.xy(3).x=200 MyPolygon.xy(3).y=150 '************************* 'show the graphic window 'and print a line and 'a big arrow '************************ GRAPHIC POLYGON MyPolygon ,%BLACK, %BLACK ' [, [fillstyle&] [, fillmode&]]]] GRAPHIC FONT "Times New Roman", 18, 7 GRAPHIC SET POS (10,300) GRAPHIC PRINT "hello this is times new roman pitch 18" WAITKEY$ GRAPHIC WINDOW END END FUNCTION
Leave a comment: