No announcement yet.


  • Filter
  • Time
  • Show
Clear All
new posts

  • Patrice Terrier

    GDImage works with different programming languages, hence this "script" is pseudo code, just replace "procedure" by "sub" or "function" and you are done

    And yes, some "IL" or "p-code" languages are able to "compile" such script on the fly.


    Graphics, graphics, graphics, graphics, graphics ...

    I plan to translate this project to PowerBASIC once i am done with it.

    It is used to represent GPS and Marine navigation data, in a photo-realistic way to replace the "classic" electronic equipments for a french thony fishing company on their new boats.

    PS: I have attached another Widget, that is being used to display the water deepth.

    Attached Files
    Last edited by Patrice Terrier; 15 May 2009, 09:54 AM.

    Leave a comment:

  • John Reinking

    Could you elaborate on
    Example of script code ...
    Is this interpreted on the fly?

    Leave a comment:

  • Mark Strickland
    Drool (does that translate to French -- Salivate)


    I have considered GDImage in the past but I don't have the much justification.

    Maybe I just need to find a project so I can buy and quit "drooling". :thinking:

    Can you post this program as an EXE/ZIP so we can see it in action?
    Last edited by Mark Strickland; 15 May 2009, 08:52 AM.

    Leave a comment:

  • Patrice Terrier
    started a topic Widget


    GDImage 5.00, has everything to produce state of the art Widget

    A GDImage Widget, is an aggregation of several sprite objects working together as a single entity.

    In this screen shot, you can see from the top left to the bottom right corner:
    • A clock animated control.
    • Two animated rotating wheels.
    • An animated goldfish.
    • Two TTF sprite objects.
    • A temperature Widget, with progress and digital display.
    • A see flow gauge Widget.
    • A Cape/Knts navigation Widget.
    • A wind orientation Widget.

    and an exclusive skinned interface to stand out from the crowd

    Example of script code to produce a Widget:

    PROCEDURE WidgetTemperature(LOCAL nGDImageCtrl is int, LOCAL nX is int, LOCAL nY is int, LOCAL rTemperature is 4-byte real)
    nBitmap, nCropBitmap, nW, nH are int
    nFontSize is int = 22
    sUseFont is string = "LCD"//"ARIAL"
    nTemperature is int = rTemperature // Casting to integer
    nTemperature = (nTemperature + 4) * 4
    stemperature is string = NumToString(rTemperature)
    IF ZD_GetObjectBitmap(IDS_TEMPERATURE) = 0 THEN
    	nBitmap = ZI_CreateBitmapFromFile(gsSkinComponentPath + "Temperature.png", nW, nH)
    	ZD_DrawBitmapToCtrl(nGDImageCtrl, nX, nY, nBitmap, ZD_ColorARGB(255, 0), IDS_TEMPERATURE, ZS_VISIBLE)
    	ZD_SetObjectLocked(IDS_TEMPERATURE, True)
    	// Create a hidden object to manipulate the progress bar
    	nBitmap = ZI_CreateBitmapFromFile(gsSkinComponentPath + "TempProgress.png", nW, nH)
    	ZD_DrawBitmapToCtrl(nGDImageCtrl, 0, 0, nBitmap, ZD_ColorARGB(255, 0), HID_TEMPPROGRESS, ZS_HIDDEN)
    	ZD_SetObjectXY(IDS_TEMPERATURE, nX, nY, False)
    // Create a new object with the good size, by croping the hidden progress object bitmap.
    nBitmap = ZI_CropBitmap(ZD_GetObjectBitmap(HID_TEMPPROGRESS), 0, 0, nW - nTemperature - 8, nH, 0)
    ZD_DrawBitmapToCtrl(nGDImageCtrl, nX - 4 + nTemperature, nY, nBitmap, ZD_ColorARGB(255, 0), IDS_TEMPPROGRESS, ZS_VISIBLE)
    ZD_SetObjectLocked(IDS_TEMPPROGRESS, True)
    IF ZD_GetObjectBitmap(IDS_TEMPMASK) = 0 THEN
    	nBitmap = ZI_CreateBitmapFromFile(gsSkinComponentPath + "TempMask.png", nW, nH)
    	ZD_DrawBitmapToCtrl(nGDImageCtrl, nX, nY, nBitmap, ZD_ColorARGB(255, 0), IDS_TEMPMASK, ZS_VISIBLE)
    	ZD_SetObjectLocked(IDS_TEMPMASK, True)
    IF ZD_GetObjectParent(IDS_TEMPCELCIUS) = 0 THEN
    	ZD_DrawTextToCtrl(nGDImageCtrl, "", nX, nY, gnFontColor, (sUseFont), nFontSize, IDS_TEMPCELCIUS, ZS_VISIBLE, 0, 0)
    nX += 18; nY += 62 
    ZD_SetObjectXY(IDS_TEMPCELCIUS, nX, nY, False)
    ZD_SetObjectText(IDS_TEMPCELCIUS, sTemperature)	
    ZD_SetObjectLocked(IDS_TEMPCELCIUS, True)