Skip to content

yasserislam/MROGeometry

Repository files navigation

Build Status

MROGeometry

Some C / Objective-C helpers related to

Parse a SVG path and return a retained CGPathRef.

See PathParser.h

Write a very simple, non-optimized form of SVG path.

Simple CGPoint math:

  • add,
  • subtract,
  • scale (multiply x and y with a number),
  • dot product,
  • distance square and distance.

Persist a CGPathRef using the SVG path format as ASCII/C String.

Parse a SVG path and return a retained CGPathRef.

Uses the Ragel-generate state machine PathParser.rl directly based on the W3C BNF path grammar for parsing.

Parse a SVG transform attribute and return a CGAffineTransform.

Uses the Ragel-generate state machine TrafoParser.rl directly based on the W3C grammar for parsing.

Global Macros

There are some macros I use all over the place. Instead including the same header in every source file I put them into MROGeometry-Prefix.pch as usual.

Generate C state machines and pdf docs from Ragel sources.

Flattr this git repo

About

C and Objective C math and geometry helpers

Resources

License

Stars

Watchers

Forks

Packages

No packages published