This is a software tool designed to function as a pad for graphic tablets. The program is built with Cocoa and is designed to enhance the user experience of graphic designers and artists using tablet devices.
The code for CocoPad was initially based on some samples provided by Wacom on their website. The application makes use of a custom NSView for drawing using three NSImages: one for the background, another for the foreground, and the last for temporary deleting mask. The drawing is composed by using an NSBezierPath on the foreground image while the background is painted on the NSView. This process is carried out only in the brush's occupied rectangle.
When the user selects the rubber option, which is done by rotating the pen upside-down, they draw on the deletion mask. The mask is then used on the foreground by using NSCompositeDestinationOut, deleting any areas that are not transparent.
The painting is carried out directly in the mouse or tablet mouse handling event. Events are handled through a loop that is included in mouseDown, and the loop is terminated with a NSLeftMouseDown. During the loop duration, "mouse coalescing" is set off.
CocoPad offers four pens of varying sizes and colors, all of which can be customized to suit the user's preferences. These settings are saved in the preferences and can be accessed from the toolbar, the menu, or by pressing numbers from 1 to 4 on the keyboard.
Overall, CocoPad is a great app that is easy to use and offers a range of features. Its compatibility with pen tablets makes it an excellent choice for artists, and the ability to customize pens is a nice touch. However, some users may find the process of handling events through a loop to be somewhat tedious.
Version 1.0: N/A