Killet Software Ing.-GbR - short: KilletSoft - is a software company, which was established in the year 1991. The society is divided into the ranges "Geodetic Standard Software", "Development Tools for Geoinformatics" and "International Geodata". The industrial sectors of emphasis of the companies supplied by KilletSoft are consulting engineers, GIS developers, Internet marketing, public utilities, logistics, telecommunications, security and public services.
Print page body  •    Contact  •    Imprint
Deutsch English

Description of the Visual Objects Class Graphics{}

To explain the possibilities of the Graphics Development Kit Graphics4VO, the documentation of the class graphics{} contained in it is shown. Further classes are described in the original documentation.

CLASS graphics

Creates a graphic object capable of constructing images


Methods for adjusting graphic parameters:
setBackgroundColor()    Sets the background color
setBlackAndWhite()      Prepares black and white graphic output
setClipRegion()         Sets the clipping area for graphics output
setColorCode()          Calculates the color value from the RGB format
setFillColor()          Sets the brush color for graphic surface elements
setFillHatch()          Sets the brush pattern for graphic surface elements
setFillHatchColor()     Sets the brush pattern color for graphic surface
                        elements
setFillPattern()        Sets color value of a user defined brush
setLineCap()            Sets the cap form of the line ends
setLineColor()          Sets the line color for graphic elements
setLinePattern()        Sets the line style for graphic elements
setLineWidth()          Sets the line width for graphic elements
setMarkerLineWidth()    Sets the line width of markers
setMarkerSize()         Sets the size of markers
setMarkerSurface()      Sets the surface of markers
setRasterMode()         Sets the raster mode for displaying of graphic
                        elements on the graphic background
setSaveArea()           Secures a portion of the output device to be
                        restored later by paintSavedArea()
setStringColor()        Sets text color
setStringFont()         Sets font attributes
setStringShadow()       Sets text shadow attributes
setWorldOrigin()        Translates the point of origin from world space
                        coordinates into physical coordinates
setWorldSysNorm()       Sets a world space Coordinate System of 1000 to
                        1000 points
setWorldSystem()        Sets the transformation factor of the world space
                        coordinates system

Methods for determining graphic parameters:
getDeviceHeight()       Returns the height of the output device
getDeviceType()         Provides information about the output device
getDeviceWidth()        Returns the width of the output device
getPhysCoordX()         Transforms horizontal position in world space
                        coordinates into physical coordinates
getPhysCoordY()         Transforms vertical position in world space
                        coordinates into physical coordinates
getPointColor()         Gets the RGB color of a point on the output device
getPointInPolygon()     Determines whether a point is located within a
                        polygon
getStringHeight()       Returns the height of the text
getStringWidth()        Returns the width of the text
getWorldCoordX()        Transforms horizontal position in physical
                        coordinates into world space coordinates
getWorldCoordY()        Transforms vertical position in physical
                        coordinates into world space coordinates
getWorldPointX()        Translates a logical point horizontal value
                        (1/72 inch) into a world space value
getWorldPointY()        Translates a logical point vertical value
                        (1/72 inch) into a world space value

Methods for painting graphic primitives:
paintBezier()           Draws a single or multiple Bezier curves or a
                        Bezier surface
paintControl()          Draws a graphic control of the desired shape
paintEllipse()          Draws an ellipse or a circle
paintEllipseCurve()     Draws a curve as a part of an ellipse or a circle
paintEllipseSector()    Draws a sector of an ellipse or a circle
paintEllipseSegment()   Draws a segment of an ellipse of a circle
paintEraseArea()        Floods a portion of the output device with the
                        color of the current brush
paintEraseCanvas()      Floods the clipping region of the output device
                        with the color of the current brush
paintFloodFill()        Fills a surface with the color of the current
                        brush
paintFrameCanvas()      Draws a border around the clipping area of the
                        output device
paintGradientArea()     Floods a portion of the output device with the
                        gradient fill
paintGradientCanvas()   Floods the clipping region of the output device
                        with the gradient fill
paintLine()             Draws a line
paintLineGroup()        Draws a group of lines
paintMarker()           Draws a marker
paintMarkerGroup()      Draws a group of markers
paintPoint()            Draws a point
paintPointGroup()       Draws a group of points
paintPolygon()          Draws a polygon
paintRectangle()        Draws a rectangle based on position and size
paintRectangleAligned() Draws a rectangle based on two coordinates
paintRectangleRounded() Draws a rectangle with rounded corners
paintSavedArea()        Draws a portion of the output device previously
                        saved with setSaveArea()
paintSpline()           Draws a spline curve
paintSpotCanvas()       Floods the clipping region of the output device
                        with lit background and spot effect
paintString()           Draws a text
paintStringRing()       Draws a text in form of a ring
paintStringShadow()     Draws a text with the shadow effect

Methods for painting charts:
paintchartBar()         Draws a bar chart
paintChartEmpty()       Draws an empty Coordinate System
paintChartIntegral()    Draws an integral surface chart
paintChartLegend()      Draws a legend for a chart
paintChartLine()        Draws a line chart
paintChartMultiBar()    Draws a parallel bar chart for comparisons
paintChartPie()         Draws a pie chart
paintChartPillar()      Draws a pillar chart
paintChartScatter()     Draws a scattering chart
paintChartSpline()      Draws a spline chart
setAutoScale()          Automatic scaling of a Coordinate System
setLogarithmic()        Calculate data for logarithmic and other scaling
setMathGraphArray()     Generates an array with data of a mathematical graph

Methods for painting and saving device independent images:
paintBmpCanvas()        Draws an Image stored in a DIB file, resource or
                        object with stretched size filling the clipping area
paintBmpDirect()        Variable drawing of an image stored in a DIB-file
                        directly with OLE-functions
paintBmpOriginal()      Draws an Image stored in a DIB file, resource or
                        object with its original size at a given position
paintBmpRepeat()        Draws an Image stored in a DIB file, resource or
                        object beginning at the lower left corner of the
                        clipping area. The image is repeated until the
                        clipping area is filled
paintBmpRestore()       Draws an Image stored in a DIB file, resource or
                        object. The image is drawn in its original size
                        at the lower left corner of the clipping area
paintBmpStretched()     Draws an Image stored in a file, resource or object
                        with stretched size at a given position
paintEnhMetaCanvas()    Draws an metadata image stored in a meta file
                        stretched on the canvas area
paintEnhMetaArea()      Draws an metadata image stored in a meta file at a
                        given position stretched to a given size
setBmpAreaToFile()      Saves an area of the output device to a Bitmap file
                        (DIB)
setBmpCanvasToFile()    Saves the clipping area of the output device to a
                        Bitmap file (DIB)
setImgAreaToFile()      Saves an area of the output device to a DIB file
                        by OLE
setImgCanvasToFile()    Saves the clipping area of the output device to a
                        DIB file with OLE
setGifAreaToFile()      Saves an area of the output device to a GIF file
setGifCanvasToFile()    Saves the clipping area of the output device to a
                        GIF file
getBmpSize()            Gets the dimension of an image stored in a DIB file,
                        a resource or an bitmap object

Methods for the drawing of ArcView shapefile figures:
setShapeFileObject()    Initializes a shape object and connects the name
                        of an ArcView shapefile with an alias for further
                        use
paintShapeFigures()     Draws shape figures of a shape object
paintShapeCanvas()      Draws all shape figures stored in a ArcView shape
                        file in the size of the clipping area
setShapeFileClose()     Destroys a shape object.
setShapeSelectArea()    Sets a device area for the painting of the shape
                        figures
setShapeUnSelectArea()  Deactivates a device area set by the function
                        setShapeSelectArea() before
setShapeSelectBox()     Sets a shape area for the painting of the shape
                        figures contained in it in world coordinates
setShapeUnSelectBox()   Deactivates a shape area set by the function
                        setShapeSelectBox() before
setShapeExtractRec()    Sets an selection of shape figures to be painted
                        by their record numbers
setShapeUnExtractRec()  Deactivates an selection of shape figures set by
                        the function setShapeExtractRec()
setShapeColorNormal()   Sets the fill and line colors for the drawing of
                        shape figures to the settings of the class
                        graphics{}
setShapeColorArray()    Sets the fill and line colors for the drawing of
                        shape figures from an array
setShapeColorTrans()    Sets the fill colors for the drawing of shape
                        figures back to transparent.
setShapeColorRandom()   Sets the fill and line colors for the drawing of
                        shape figures to randomly generated colors.
getShapeFigCoordID()    Determines coordinates and other shape figure
                        parameters by the shape ID
getShapeFigCoordRec()   Determines coordinates and other shape figure
                        parameters by the record number
getShapeFigBoxID()      Determines the surrounding box coordinates and
                        other shape figure parameters by the shape ID
getShapeFigBoxRec()     Determines the surrounding box coordinates and
                        other shape figure parameters by the record
                        number
getShapeFileBox()       Determines the surrounding box coordinates of the
                        whole shapefile and other shapefile parameters
getShapeSize()          Gets the dimension of a shape stored in a ArcView
                        shapefile

Functions for calculations with polygons:
getPolygonBox()         Determines a box, which surrounds a polygon with
                        one or more polygon rings
getPolygonArea()        Determines the area of a polygon with one or more
                        polygon rings
getPolygonFocalPoint()  Computes the statistic focal center of a polygon
                        with one or more polygon rings
getPolygonCenterPoint() Computes the logical center of a polygon with one
                        or more polygon rings
isPointInBox()          Determines whether a point is within a box
isPointInPolygon()      Determines whether a point is within a polygon with
                        only one polygon ring.
isPointInPolyRings()    Determines whether a point is within a polygon with
                        one or more polygon rings.
isPolygonHole()         Determines whether a polygon is defined as a "hole"

Methods for painting fractals:
paintFractal()          Draws a Julia or Mandelbrot fractal

Variables:
_oOrigin (point)        The position of the left bottom corner on the
                        output device in physical coordinates
_oDim (dimension)       The dimension of the area on the output device
                        available for graphics in physical coordinates


Remarks:
Methods of this class should not be called in application code. Objects
of this class are instantiated automatically by the following graphics
classes:

gTopAppWindow          TopAppWindow with graphics
gChildAppWindow        ChildAppWindow with graphics
gShellWindow           ShellWindow with graphics
gDataWindow            DataWindow with graphics and transparent controls
gDialogWindow          DialogWindow with graphics and transparent controls
gScrollWindow          Scrollable ChildAppWindow with graphics
gTabControl            TabControlWindow with graphics
gSplitWindow           SplitWindow with graphics
gColorWindow           Window to show and choose the Graphics4VO colors
gPrinter               Printer class to print text and graphics
gMemory                Class to produce and use graphics in memory
gEnhMetaFile           Class to produce Enhanced Metafiles (.emf)
gTransPushButton       Class to produce transparent PushButtons

Each of these classes, except gTransPushButton, can get access to the
methods of the class graphics through the instant variable _oGraphics of
the class graphics. Methods of this class should be called only from the
paint() method of the above classes.


Example:
CLASS winGraphShell INHERIT gShellWindow

METHOD paint() CLASS winGraphShell
LOCAL nWinW,nWinH AS WORD
SELF:_oGraphics:setBackgroundColor((G_COLORLIGHTCYAN)
SELF:_oGraphics:paintGradientCanvas(10,G_DIRECTIONDOWN)
nWinW := SELF:_oGraphics:getDeviceWidth()
nWinH := SELF:_oGraphics:getDeviceHeight()
SELF:_oGraphics:setWorldOrigin(nWinW / 2, nWinH / 2)
SELF:_oGraphics:setStringFont(G_FONTTYPEROMAN,40,120,G_FONTBOLD,;
  G_FONTDIMFLEX,0.0)
SELF:_oGraphics:setStringColor(G_COLORWHITE)
SELF:_oGraphics:setStringShadow(6,G_COLORBLACK,G_DIRECTIONRIGHTDOWN)
SELF:_oGraphics:paintStringShadow(0,nWinH * 0.2,"Graphics4VO",G_ORIGINCENTER)
RETURN SELF

KilletSoft News In order that you always are well informed about our company, we write actual news, current information and special offers here into this column.

KilletSoft Logo Anniversary
 
Good service pays off - 25 years Geo Software by KilletSoft!
 Read more...

KilletSoft Logo Updates
 
The period, in which you can use free updates of our programs, has been extended!
 Read more...

KilletSoft Logo Innovation Award 2016
 
Award 2016 KilletSoft's geodetic software has won for the second year in succession the Innovation Award from the Initiative Small and Medium Enterprises.
 Certificate TRANSDAT...
 Certificate ORTWIN...
 Read the Press Release...

KilletSoft Logo GeoDLL / TRANSDAT
 
Proposal for using Polygonal Validity Scopes in NTv2 grid files.
 Read the White Paper...

KilletSoft Logo WINDOWS© 10 compatible
 
Win10 kompatibel Our software has got the certificate "WINDOWS© 10 compatible". So it complies with the compatibility standards of the Microsoft operating systems WINDOWS© 10.

KilletSoft Logo NTv2 Hamburg
 
Highly accurate NTv2 file of the Federal State of Hamburg free of charge for TRANSDAT and GeoDLL users.
 Download the NTv2 file ...
 Read the Press Release...

KilletSoft Logo GeoDLL
 
GeoDLL provides Time Zone Calculations with aspect to Maritime Territorial Limits.
 Read the Press Release...

KilletSoft Logo TRANSDAT / GeoDLL
 
The program and the DLL now support all HARN / HPGN Reference Systems of the United States.
 Read more...

KilletSoft Logo Translators wanted!
 
The latest versions of the programs TRANSDAT and SEVENPAR support language files for the programs interface. Since the language dependent texts are managed in external files,  new languages can be added at any time by creating new language files. Every user of the program now can compile language files for himself and our customers.