Results 1 to 2 of 2

Thread: [VB6] Tutorial: Vector- and PixelGraphics using Cairo

  1. #1

    Thread Starter
    Join Date
    Jun 2013

    [VB6] Tutorial: Vector- and PixelGraphics using Cairo

    Whilst the graphics-support of the VB6-runtime (e.g. PictureBox, Shape-Controls, Line-, Circle-, Print-commands)
    is often sufficient for simpler graphics-scenarios, there are things which require the usage of "heavier guns"...
    Meaning - the usage of a more capable graphic-lib with support for e.g.:
    - Antialiased Drawings
    - full Transparency-support using Alpha-Parameters for all Drawing-Primitives (Alpha-Colors and Alpha-Bitmaps)
    - Unicode-TextOutput
    - modern "Blend-Operations" for Pixel-Buffers (meaning "more than just Alpha-Blending")
    - all kind of "nestable Transforms" (as e.g. Translate, Scale, Rotate)

    One of those libs is the one from, which is platform-independent - and in use worldwide.
    IMO - it's a worthwhile API to learn and invest time into - considering, that we all have to "switch from VB6 to another language"
    at some point in time... and learning a lib which has bindings for "all other languages" and not only works on Windows, might come in handy later...


    I will not write much text here about the several "Sub-Steps in the Tutorial" -
    since all that is explained in the comments of a lot of VB6-Projects which are organized into SubFolders of the Tutorial-Zip:
    (the numbered Project-Folder-Names are "increasing in difficulty, along your learning-curve-progress")

    • 1 Hello World
    • 2 Scaling and simple Transforms
    • 3 Lines and Stroking
    • 4 Poly-Lines and BSpline-Interpolation
    • 5 Bezier-Curves
    • 6 Spline-Interaction
    • 7 (A) Text along Curves
    • 7 (B) Text along Circles
    • 7 (C) FontRendering-Options
    • 8 Shapes and Alpha-Opacities
    • 9 Gradients
    • 10 Clipping
    • 11 Masking
    • 12 (A) ImageSurfaces Rotate+Scale
    • 12 (B) ImageSurfaces Skew+Perspective
    • 12 (C) ImageSurfaces Ken Burns Effect
    • 13 Alpha-JPGs
    • 14 Thumbnailing per ImageList
    • 15 ImageList and IconResources
    • 16 SVG
    • 17 PDF-Creation
    • 18 Chipmunk-Physics (simple Balls)
    • 19 Chipmunk-Physics (Fluid)
    • 20 first simple Widgets (GUI-Controls)

    The Tutorial-Zip was too large to upload (in total it's about 7MB, since the Project-Folders contain a lot of Demo-PNG-, JPG- and SVG-images) -
    so I'm providing a GitHub-URL instead (which is an allowed workaround for this forum in the meantime):

    So - please download the Tutorial-Zip from the GitHub-link above...
    Note, that before running the Tutorial-Projects - one has to install the COM-Class-wrapper for cairo first (vbRichClient5).

    Here a ScreenShot of a Tutorial-Project, which is more related to handling of PixelGraphics via Cairo:

    And two others, which show-off the Vector-graphics-support of the cairo-wrapper-classes:

    Happy studying...


  2. #2
    Fanatic Member
    Join Date
    Jan 2020

    Re: [VB6] Tutorial: Vector- and PixelGraphics using Cairo

    rc6 svg,The displayed picture is jagged, but Google Chrome does not have jagged. Is there a solution?
    (Disable VBs DPI scaling and its no problem, IEs webbrowser control can also display SVG)
    Last edited by xiaoyao; Apr 7th, 2021 at 10:29 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width