Announcement

Collapse
No announcement yet.

filled triangle

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • filled triangle

    I'm wanting to print on an attached graphic (not a loaded bmp) a filled triangle
    i.e. like > but filled in.

    I've tried using MS Linedraw and Generic DOS and use chr$(16) which would
    be what i want but that doesnt work. Anyone found a way ?
    Client Writeup for the CPA

    buffs.proboards2.com

    Links Page

  • #2
    Lineto, FloodFill
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      GDI: Polygon function

      PB: GRAPHIC POLYGON function

      Are you drawing directly to a DC, that is not using PB GRAPHICS functions or?
      Rick Angell

      Comment


      • #4
        Im using the graphics and xprint statements.

        This is how ive done it so far.

        printed a GRAPHIC/XPRINT BOX (filled) with black
        then set line width to 1
        used graphic/xprint line to print white lines from the top left to center right
        and bottom left to center right to 'bleach out' the unwanted black of the
        box.

        I'll look at your suggestions thanks.
        Client Writeup for the CPA

        buffs.proboards2.com

        Links Page

        Comment


        • #5
          Fred,
          Just set MyPolygon.count= 3 for a triangle

          Paul.
          Code:
          'PBCC4 program
          #COMPILE EXE
          #REGISTER NONE
          
          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
          
          GRAPHIC WINDOW "Graphics", 100, 100, 400, 400  TO hWin???
          GRAPHIC ATTACH hWin???, 0
          
          DIM MyPolygon AS PolyArray
          
          MyPolygon.count=15   'specify 15 points in this polygon
          
          FOR pt&=1 TO MyPolygon.count
              'for each point, specify the x and y co-ordinates
              MyPolygon.xy(pt&).x= 200*SIN(2*pi* pt&/Mypolygon.count)+200
              MyPolygon.xy(pt&).y= 200*COS(2*pi* pt&/Mypolygon.count)+200
          
          
          NEXT
          
          GRAPHIC POLYGON MyPolygon  ,%RED, %GREEN ' [, [fillstyle&] [, fillmode&]]]]
          
          WAITKEY$
          GRAPHIC WINDOW END
          
          END FUNCTION

          Comment


          • #6
            great!

            I can modify that for a triangle pointing to the right instead of down (changing
            your count to 3) very easily. thanks
            Client Writeup for the CPA

            buffs.proboards2.com

            Links Page

            Comment

            Working...
            X