28.1 Overview

Plugins that have the capability flag HWPLUG_CAPS_VECTOR set can provide support for drawing vector-based paths with Hollywood. Hollywood comes with a vectorgraphics library which can use an internal vectorgraphics backend or an external one provided by a plugin. The inbuilt vectorgraphics backend is platform-independent but has some restrictions when it comes to filling complex shapes. That's why it might be better to write a vectorgraphics plugin for certain advanced tasks. Vectorgraphics plugins might want to use the vector-based drawing functionality offered by the host operating systems, e.g. Quartz on macOS or GDI+ on Windows, or they could use platform-independent vector drawing backends like Cairo.

Starting with Hollywood 6.0 vectorgraphics plugins support the HWEXT_VECTOR_EXACTFIT extension. If this extension is set, GetPathExtents() must take the transformation matrix it is passed into account when computing the path's extents. If HWEXT_VECTOR_EXACTFIT is not set, Hollywood will compute the extents of the transformed path but this is not recommended since it is your plugin that knows best about the real extents. See Extension plugins to learn how to use plugin extension bits.

Starting with Hollywood 10.0 vectorgraphics plugins support the HWEXT_VECTOR_CUSTOMFT2 extension bit to tell Hollywood that they're using a custom FreeType2 implementation that is not compatible with the one that is built into Hollywood. If this extension bit is set, Hollywood will call your plugin whenever it needs to turn a font into an FT_Face. Consequently, plugins which set HWEXT_VECTOR_CUSTOMFT2 must implement the OpenFont() and CloseFont() vectors. Note that on WarpOS Hollywood will activate HWEXT_VECTOR_CUSTOMFT2 automatically for WarpOS plugins because those can only access a PPC build of FreeType2 whose FT_Face handles are not compatible with the 68k ones expected by Hollywood.


Show TOC