Graphics and storage


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Graphics and storage

  1. #1
    Clyde Guest

    Graphics and storage


    Hi all...

    Is it possible with VB to store shapes and colours (e.g a red circle, a blue
    triangle...)in a database (preferably on access)and make an interface with
    VB to read this data and represent the corresponding shape and colour graphically?

    If so. In what direction do I have to search for more info.?

    Thankx

  2. #2
    Mike D Sutton Guest

    Re: Graphics and storage

    > Is it possible with VB to store shapes and colours (e.g a red circle, a
    blue
    > triangle...)in a database (preferably on access)and make an interface with
    > VB to read this data and represent the corresponding shape and colour

    graphically?
    >
    > If so. In what direction do I have to search for more info.?


    Sure, all vector shapes can be represented as a series of coordinates then
    their fill/line styles and colours as a series of other fields. You could
    quite easily take an array of points and CopyMemory() then into a string or
    something to store in a database (If you're worried about storage size) If
    not then simply make a 1 to many relationship from each shape to a table of
    coordinates, how you store it is really up to you.
    Then to draw it you simply use the API graphics routines such as
    MoveToEx()/LineTo() for lines, Rectangle() for rectangles Ellipse() for
    circles/ellipses, Polygon() for polygons, triangles, hexagons etc. Colours
    and styles are changed through using the API pen and brush objects and
    there's a library on my page that encapsulates their usage called APIDraw.
    Hope this helps,

    Mike


    -- EDais --

    WWW: Http://EDais.earlsoft.co.uk/
    Work E-Mail: EDais@btclick.com
    Other E-Mail: Mike.Sutton@btclick.com



  3. #3
    alejandro Lapeyre Guest

    Re: Graphics and storage

    You may give a chance to the enhanced metafile format files...
    (Which is some kind of "interpreted" GDI instructions)

    regards,
    Alejandro Lapeyre.

    "Clyde" <clydelo@intnet.mu> escribió en el mensaje
    news:3bcc94cf$1@news.devx.com...
    >
    > Hi all...
    >
    > Is it possible with VB to store shapes and colours (e.g a red circle, a

    blue
    > triangle...)in a database (preferably on access)and make an interface with
    > VB to read this data and represent the corresponding shape and colour

    graphically?
    >
    > If so. In what direction do I have to search for more info.?
    >
    > Thankx




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center