Announcement

Collapse
No announcement yet.

GRAPHIC Summary - Images

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

  • GRAPHIC Summary - Images

    I don't think I've posted this before. It's a small image I use, showing the various paths for getting an image into a PowerBASIC application/control. Right now, I've got it shown as my desktop image, just for easy access while I'm doing some graphics programming.

    On the left are the image sources that PowerBASIC application can use - *.bmp files and *.pbr resource files.

    The terminology "x3" refers to any of the three allowed graphic targets: Graphic Window, Graphic Control, Memory Bitmap.

    On the right, in green, is a short statement of whether the entire image is affected by the function, or whether it can operate on part of the image. Also in green is whether the statement can resize the image.




    For example, the last line says that a *.bmp disk file can be pulled into a Memory Bitmap using the Graphic Bitmap Load statement. The entire image is loaded and cannot be resized during loading.

    The 3rd line says that any graphic target ("x3") can use Graphic Copy to copy part/all of an image to another graphic target, but cannot resize it during the step.

    Finally, the 5th line says that a *.pbr can be used to create an ImageList, which the Graphic Imagelist statement can use to copy a complete image to any of the graphic targets ("x3") without resizing.

    This helper image does not address Image, ImageX, ImgButton or ImgButtonX controls - all of which require an image from a *.pbr resource file. Nor does it describe how to add an image to a *.pbr file.

    I hope this is useful to some of you. If anyone finds something wrong with it, or has a suggestion on a better format, please let me know.
    Last edited by Gary Beene; 18 Nov 2009, 08:53 AM.

  • #2
    Good idea Gary.

    Could this be the start of an alternative PB manual?

    Comment


    • #3
      Well, I don't know about a manual/book, but my website does have almost 100 pages of PowerBASIC tutorials, with more material in work. Add that to the 400 snippets in my PowerBASIC source code library and a would-be author would certainly make the beginnings of a book!

      Comment


      • #4
        Code is cheap - these days anyway.

        Take your diagram above - you would need a lot of code to get the same information across.

        Come to think of it, it would make a good index, hyperlinked to your code examples.

        Comment

        Working...
        X