Date: 02-16-2022
Return to Index
created by gbSnippets
'In a nutshell, the PowerBASIC graphics capabilities consist primarily of:
' - 4 controls (Image, ImageX, ImgButton, ImgButtonX) which draw on PBR images
' - 3 graphic targets (Graphic Control, Graphic Window, Memory Bitmap)
' - Shape functions - Arc, Box, Ellipse, Line, Pie, Point, Polygon, Polyline
' - Image Functions - Copy, Render, Stretch, Get Bit, Set Bits, Save, ImageList
' - Text functions - Chr Size, Print, Set Font, Text Size, Get Lines
' - Keyboard functions - Inkey$, Input, InStat, Input Flush, Line Input, WaitKey$
'Additionally, there are functions for selecting graphic targets, managing
'a selected canvas, setting colors, property setting functions and several
'other management functions.
'Simple Graphic Controls:
'Image / ImageX - load from a resource file (*.pbr)
'Image control resizes to fit dimensions of image (except w/style %ss_centerimage)
'ImageX control size is fixed. The image is resized to fit the size of the control.
'Graphical Button Controls
'ImgButton / ImgButtonX - load from a resource file (*.pbr)
'ImgButton control size is fixed. Image is not resized and is placed in center of control.
'ImgButtonX control size is fixed. The image is resized to fit the size of the control.
'Graphic Targets and the corresponding PowerBASIC command to create them:
'1. Graphic Control - Control Add Graphic
'2. Graphic Window - Graphic Window
'3. Memory BitMap - Memory Bitmap New or Memory Bitmap Load
'Graphic Sources
'1. PBR
'2. File
'3, ImageList
'4. Other Graphic targets (Graphic Control, Graphic Window, Memory Bitmap)
'Routes to loading images into graphic control/graphic windows/memory bitmap
'there are two paths to loading an image from a disk - Graphic Render and
'Graphic Bitmap Load
pbr -------------------------------> Render ---------------> x3 'all/resize
disk -------------------------------> Render ---------------> x3 'all/resize
x3 --------> Copy ----------------> x3 'partial/noresize
x3 --------> Stretch -------------> x3 'partial/resize
pbr ----> ImageList----------------> Graphic ImageList ---> x3 'all/noresize
pbr ----> Graphic Bitmap Load -----------------------------> Memory Bitmap 'all/noresize
disk ----> Graphic Bitmap Load -----------------------------> Memory Bitmap 'all/noresize
'gbs_00164
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm