|PowerBASIC Home Shop Online Products Forums Support Downloads|
Unless otherwise noted, these features are
Actual function names are shown in This Color.
The OpenGfx function is used to create graphics windows. Graphics Tools Standard can create up to four (4) graphics windows per program, and Graphics Tools Pro can create up to 256. Each window has its own pen, brush, font, and gradient, and most Graphics Tools "option" settings can be specified on a window-by-window basis. Many different window-border styles can be created, including raised, sunken, "bump", caption, and more!
GfxCLS (Graphics CLS) erases a graphics window using a color that you specify.
DrawFromis used to specify the starting location of most drawing operations, and MoveLPR tells Graphics Tools to do things like "move the starting location x units to the right".
DrawToand DrawLine can be used to draw straight lines, based on starting and ending locations. DrawAngle can be used to draw a line based on an angle and a distance. The DrawMultiLine function draws several lines at the same time, based on an array of points. Great for graphs!
DrawPixelsets the color of a single pixel, and PixelColor reports the current color of a pixel.
DrawRectis used to draw rectangles, DrawArea clears a rectangular area of the graphics window, DrawFocus draws erasable "focus rectangles", and DrawSoftRect draws rectangles with rounded corners.
DrawCircleand DrawEllipse are used to draw circles and ellipses (ovals). Graphics Tools Pro adds the DrawEllipseRotated function, which can draw an ellipse rotated to any angle.
DrawArcdraws portions of circles and ellipses. DrawChord adds a line that connects the endpoints of an arc, and DrawPie adds lines that connect the endpoints to the center of the figure. Perfect for drawing Pie Charts!
DrawCube draws 3D cubes, boxes, and bars of any shape and size. DrawCylinder draws 3D cylinders and disks -- also great for bar charts! -- and DrawWedge draws "wedges" for things like 3D pie charts. (Please note that Graphics Tools is not a Charting and Graphing toolkit, it is a Drawing and Graphics toolkit. It can, however, be used to create a wide variety of high-quality images, including Charts and Graphs.) Graphics Tools Pro adds the DrawTube function, which draws realistic tubes when used with an appropriate Gradient.
Speaking of Gradients... You can save and load ready-to-use Gradients with the GradientSave and GradientLoad functions, tell Graphics Tools which figures to fill with the GradientBrush function, design and "tweak" your own Gradients with GradientValue, and even access the colors of gradient one-by-one with the GradientColor function.
DrawPolygondraws simple or complex polygons, based on an array of points that you provide. DrawBezier is similar, except that Bezier Curves are drawn.
DrawPgramdraws a parallelogram or rhombus (remember geometry class?) and DrawXagon draws x-sided figures like pentagons, hexagons, and octagons. The DrawXagon function can also draw "star" shaped figures like pentagrams and x-pointed stars.
DrawFloodfills areas of the graphics window with a certain color or bitmap pattern. Both "flood-to-border" and "flood-surface" modes are supported.
Display Image Files
The DisplayBitmap function can display standard Windows bitmap files (or embedded resources) in their original size, and StretchBitmap can be used to enlarge or reduce an image. CropBitmap allows you to enlarge or reduce a portion of a bitmap. All of these functions support horizontal and vertical "flipping", many different display modes (including XOR drawing), and single-color loading.
The DisplayIcon, DisplayCursor, StretchIcon, and StretchCursor functions allow you to work with Windows icons and cursors. Use one of the "stock" images that Windows provides, embed icons and cursors directly into your program, or load icons and cursors from standard-format disk files. (Many thousands of icon/cursor images are available on the internet.) The AnimateCursor and AnimateIcon functions can even be used to play ANI files! Graphics Tools Pro adds the AutoPlayCursor and AutoPlayIcon functions, and AutoPlayControl can be used to pause and resume auto-play images.
The DisplayImage and StretchImage functions allow you to display images files using any format that Windows supports including (on most systems) Windows MetaFiles, JPEGs, and others. (Because of restrictions imposed by the patent-holder, GIF files are not supported by Graphics Tools.)
The Graphics Tools Pro DisplayJPEG, StretchJPEG, and CropJPEG functions support the use of JPEG images on any system, regardless of whether or not Windows is configured to support JPEG files.
GET/PUT Style Graphics
Graphics Tools allows the use of two or more graphics windows in the same program, and the DisplayWindow, StretchWindow, and CropWindow functions can be used to copy the contents (or a portion of the contents) of one window into another. XOR copying is supported, so you can create "sprites" in a hidden graphics window and display them in a visible one.
Windows Screen Elements
The DrawButton function can be used to draw familiar Windows screen elements like pushbuttons, radio buttons, and checkboxes, all in a variety of states. And DrawFrame can be used to create raised, sunken, etched, and "bump" lines and rectangles.
Automatic "Scaling" Functions
With Graphics Tools, you'll never have to worry about the Windows desktop resolution (800x600 etc.) or how large your graphics window is, or anything else! You can simply draw inside a "world" that is always 1024x1024 (or any other scale that you prefer), and Graphics Tools will perform all of the size and scale conversions that are necessary to display your drawing in the available space.
Define Your Own "World"
Prefer a drawing world where the origin (0,0) is in the middle of the window? No problem! Just use the GfxWorld function to tell Graphics Tools what the left, right, top, and bottom limits are, and start drawing. Use any integer-based coordinate system you like!
Sixteen Different Drawing Modes
All 16 of the standard Windows Drawing Modes are supported by the GfxDrawMode function, including Opaque Drawing (the default), several Color Merge and Color Mask modes (where the drawing colors and the background are combined in various ways), and XOR Drawing, which allows lines and figures to be "un-drawn" at a later time.
The "TempDraw" Mode
Graphics Tools also supports "temporary" drawing. Once you activate the TempDraw mode, future drawing operations can be easily erased, leaving only the "permanent" parts of your drawing. Then you can turn off the TempDraw mode and return to normal operation. And the TempErase function can be used to erase all or part of the temporary image. The TempDraw system is great for "rubber-banding"!
Easy-To-Use Common Graphics Dialogs
The SelectGfxFile function provides a standard open-file dialog that you can use for selecting bitmaps, icons, cursors, JPEGs, or just about any other type of image file.
SelectGfxColor provides an easily managed "choose a color" dialog. You can pre-define up to 16 custom colors with the CustomColor function, and allow the user to modify them.
Easy Graphics Window Management
Create a graphics window with OpenGfx, then show, hide, freeze, or unfreeze it with the GfxWindow function. Change dozens of options with GfxOption, and use the GfxLoc function to save and restore drawing locations.
Graphics Tools Pro allows the creation of sizable and movable graphics windows, and the GfxResize, GfxMove, and GfxScroll functions let your applications control the windows programmatically. (You can allow the user to resize and move a graphics window, using the mouse.)
Tool Creation Functions
Pens (which are used to draw lines and shapes) can be created and modified with the Pen, PenColor, PenStyle, and PenWidth functions.
Brushes (which are used to fill shapes) can be created and modified with the Brush, BrushColor, BrushHatch, and BrushStyle functions, and the BrushBitmap function tells Graphics Tools to fill shapes using an existing bitmap.
Fonts can be created and modified with the GfxFont, GfxFontName, GfxFontColor, GfxFontHeight, GfxFontWidth GfxFontSize, GfxFontWeight, and GfxFontAngle functions, and effects like underlining and italics can be added with GfxFontEffects.
Impressive Text Effects
DrawTextBoxand DrawTextRow can display text in virtually any font that Windows can produce. You can use dozens of different fonts all at the same time. Graphics Tools can draw text with shadows, outlines, and automatic edge coloring, as well as "embossing" effects, horizontal and vertical centering, character-by-character animation, printing at any angle, and much more.
Graphics Tools Pro adds an entirely new dimension to text effects with Gradient-Filled Text. Click HERE for a sample.
Create Standard Windows Image Files
The SaveGfxWindow function allows you to save the contents of an entire graphics window in a standard-format bitmap file. Just specify a file name, and Graphics Tools will do the rest! Or use the SaveGfxArea function to save just part of an image.
The SaveGfxMode function tells Graphics Tools to create monochrome, 16-color, 256-color, 64k-color, or TrueColor bitmap files.
And Graphics Tools Pro adds the ability to save standard-format JPEG files on any computer system, using 4:1:1 or 4:2:2 sampling, in 99 different quality levels.
Print Your Graphics Tools Images
Graphics Tools Pro includes the GfxPrintWindow and GfxPrintArea, to print all or part of whatever you draw. Standard Printer Setup and Page Setup (with WYSIWYG) dialogs can be displayed with the GfxPrintSetup and GfxPrintPageSetup functions. The status of the most recent print job can be monitored with GfxPrintStatus, and utility functions called GfxPrintParam and GfxPrintDefaults are also provided.
Create Complex Images with "Clip Areas"
If you use the Graphics Tools Pro GfxClipArea function, you can define areas of a graphics window where drawing is and isn't allowed. This makes things like drawing half-circles a snap, not to mention much more complex figures.
Graphics windows that are created with Graphics Tools Pro can be the target of drag-and-drop operations. With the GfxDroppedFiles function it's easy to write a program that allows you to drag an image file from Explorer onto a graphics window, and have the image appear wherever it is dropped!
Use Windows Colors or "HSW" Colors
Graphics Tools supports 100% of the colors that your monitor and video card support, using industry-standard Windows Color values. Or you can use the Graphics Tools HSW color system to specify colors by "Hue, Saturation, and Whiteness". HSW colors make producing colors like Pink, Orange, and Yellow much easier than RGB colors.
Create "Holes" in the Graphics Window
The Graphics Tools DrawHole function is used to create "transparent" areas of the graphics window, to allow the parent window to show through. When Graphics Tools and Console Tools are used together, PB/CC programmers can specify console rows and columns where PRINT, COLOR, and LOCATE can be used.
Lots of Convenience Functions
HighlightColor creates highlighted and shaded versions of the colors that you specify..
SystemColor gives you easy access the Windows "Appearance" settings, so you can find out (for example) what color the current user prefers for text and backgrounds.
Okay, we have rambled on long enough. Graphics Tools also includes functions called ActualColor, BlueValue, GreenValue, RedValue, HueValue, SaturationValue, WhitenessValue, BitmapParam, CursorParam, IconParam, ImageParam, CalcPoint, GfxSyncCursor, GfxCaption, GfxRefresh, GfxUpdate, GfxBkgdColor, GfxBkgdMode, GfxMetrics, GfxX, GfxY, hGfx, hGfxFont, HSWtoRGB, RGBtoHSW, FillHole, MouseOver, MouseOverX, MouseOverY, PolyFillMode, UserDraw, GfxConvert, GfxCursor, GfxToolsVersion, GfxIsOpen, GfxLPR, GfxResponse, GfxSquareness, InitGraphicsTools, UseGfxWindow, and WedgOrder. Graphics Tools Pro adds functions called JpegParam, InitGradientHSW, and InitGradientRGB.
PowerBASIC, Inc. 2061 Englewood Road
Englewood, FL 34223|
Telephone: (888) 659-8000 for Sales Only, (941) 473-7300, or FAX (941) 681-3100
Email: firstname.lastname@example.org or email@example.com
For questions or comments about this web site, please email: firstname.lastname@example.org
PowerBASIC is a registered trademark of PowerBASIC, Inc.
All contents Copyright © 1996-2010, PowerBASIC, Inc. All Rights Reserved.