Skip to content

0.2.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@broadwaylamb broadwaylamb released this 25 Jun 16:43
· 20 commits to master since this release

Finally, the second version of SwiftyHaru is released!

Plenty of new features were implemented, fixed building when using SPM. Please note that this version requires Swift 3.1.

If you use CocoaPods, you'll be happy to know that we don't use CLibHaru and CLibPNG as separate pods that SwiftyHaru depends on anymore, but rather they are included in the same pod. It makes managing dependencies a bit simpler.

You can refer to the FEATURES.md file if you want to see the exact functionality of LibHaru that is present in SwiftyHaru 0.2.0.

Breaking changes:

  • Changed the signature of the DrawingContext.fill(_:evenOddRule:stroke:) and DrawingContext.clip(to:evenOddRule:_:) methods. Instead of Bool value for fill rule they now require the Path.FillRule enum value.

Closed issues:

  • Implement high-level grid drawing #6
  • Package has unsupported layout for linux #7

Implemented features:

  • Loading TrueType fonts from a .ttc collection
  • Getting a bounding box of a specified text put at a specified position
  • Getting the ascent of a font
  • Getting the descent of a font
  • Getting the x-height of a font
  • Getting the cap height of a font
  • Setting metadata (author, creator, title, subject, keywords, creation date, modification date)
  • Setting a password, encryption mode and permissions
  • Setting a compression mode
  • Getting the depth of the graphics state stack
  • Closure-based syntax for saving and restoring the graphics state
  • Showing a text in a provided rectangle
  • High-level customizable interface for drawing grids!

Fixes:

  • Setting miterLimit, font and fontSize of DrawingContext, width and height of PDFPage to an invalid value now causes precondition failure.
  • Many more.