0.2.0
Pre-release
Pre-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:)
andDrawingContext.clip(to:evenOddRule:_:)
methods. Instead ofBool
value for fill rule they now require thePath.FillRule
enum value.
Closed issues:
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
andfontSize
ofDrawingContext
,width
andheight
ofPDFPage
to an invalid value now causes precondition failure. - Many more.