Categories

CoreGraphics

  • Jun 19, 2011

    Objective-C era

    An RSS-feed and location-based iOS application

    The purpose of this post is so that I will have a link to give people when they ask: how do I write an iOS application that pulls data from an RSS feed, displays it pretty and can put things on a map. I'll show you all of that and more as I rewrite my oldest iOS application from scratch: FuelView.

    Read article

  • Mar 25, 2011

    Objective-C era

    Mac QuartzGL (2D drawing on the graphics card) performance

    QuartzGL was introduced as an official feature in Mac OS X 10.5 Leopard (although it was a developer-only feature in Mac OS X 10.4 as Quartz 2D Extreme). However, it is off by default and is largely ignored by most developers. In this post, I look at how to enable QuartzGL, the performance impact it has on different kinds of drawing and whether you should use it in your Mac programs.

    Read article

  • May 17, 2010

    Objective-C era

    5 ways to draw a 2D shape with a hole in CoreGraphics

    In this post, I look at 5 different ways that you can draw a very simple shape: a square with a triangular hole cut out of the center. In a drawing environment like CoreGraphics which offers double buffering, winding count path filling, even-odd path filling and clipping regions, there's no single answer. An iPhone sample project is provided containing the code but all drawing functions are identical on the Mac.

    Read article

  • Sep 9, 2009

    Objective-C era

    Creating alpha masks from text on the iPhone and Mac

    Alpha masks are a powerful way to create graphical effects in your program. In this post, I'll show you how to create an alpha mask from a text string and use that mask to create text-based effects with an image. I'll also show you how to do this on the iPhone and the Mac, so you can see the differences between these platforms in this area.

    Read article

  • Apr 12, 2009

    Objective-C era

    Showing a "Loading..." message over the iPhone keyboard

    The "Text" (SMS) application on the iPhone uses a custom, semi-transparent view to show its "Sending..." message over the keyboard. I'll show you a simple class that can display semi-transparent loading messages and how you can display messages over the keyboard.

    Read article

  • Sep 13, 2008

    Objective-C era

    Drawing gloss gradients in CoreGraphics

    This post presents a function &mdash DrawGlossGradient(CGContextRef context, NSColor *color, NSRect inRect) &mdash that will draw a "gloss" gradient in a single statement. All colors in the gradient are calculated from the single color parameter.

    Read article