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 cairographics.org, 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...

Tutorial-Contents:

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):
https://github.com/vbRichClient/CairoTutorial

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...

Olaf