So Matalot 1.1 is in active development and will have some really interesting new features. These features are what we believe Matalot needs. But what would you like to see?
Drawing a round rect with Quartz
Update: Fixed a bug when drawing at origin different from 0,0.
If you’re doing Quartz drawing code, you probably need or will need to draw a rect with round corners. Doing it for so many times, I just came up with this simple routine which will hopefully make your life easier:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | void DPContextAddRoundRect(CGContextRef context, CGRect rect, CGFloat cornerRad) { // Top Left CGContextMoveToPoint(context, rect.origin.x, cornerRad); CGContextAddArcToPoint(context, rect.origin.x, rect.origin.y, rect.origin.x + cornerRad, rect.origin.y, cornerRad); // Top right CGContextAddArcToPoint(context, rect.origin.x + rect.size.width, rect.origin.y, rect.origin.x + rect.size.width, rect.origin.x + cornerRad, cornerRad); // Bottom right CGContextAddArcToPoint(context, rect.origin.x + rect.size.width, rect.origin.y + rect.size.height, rect.origin.x + rect.size.width - cornerRad, rect.origin.y + rect.size.height, cornerRad); // Bottom left CGContextAddArcToPoint(context, rect.origin.x, rect.origin.y + rect.size.height, rect.origin.x, rect.origin.y, cornerRad); CGContextClosePath(context); } |
This simple function takes a rect in which to draw the path, and a radius for the corners. Play with it and see how it works.
New Support Section
After many hours of work, we now have a new support section at www.dpompa.com/support. It contains answers to the most frequently asked questions we received about Matalot, as well as detailed explanations and tutorials.
The new section should help you find answers quickly, but you should always contact us directly if you need a human at the other side. Our support email remains the same an is support@dpompa.com.

