Home Component Writing
New Blog Posts: Merging Reports - Part 1 and Part 2

how can i draw a triangle shape,build a new shape type?

edited May 2003 in Component Writing
I need to draw a triangle shape or a a diagonal in a Shape,but when i
inherited to create my own shape type, the shape only draw the rect type
without diagonal.

someone would like to tell me how can i do it right? TKS.

Comments

  • edited May 2003
    What draw command does your triangle shape component create in its
    PropertiesToDrawCommand? You should create a TmyDrawTriangle draw command.
    Then override the TmyDrawTriangle draw command's Draw routine to actually
    draw a triangle on the canvas using TCanvas routines. What you are seeing is
    that you are letting the device render the triangle, but our device classes
    have no code in them to draw a triangle, just rectangles/ round rects and
    ellipses.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited May 2003
    Tks. I had finished It.

This discussion has been closed.