Thinking in Ink

Thinking in Ink

Now that we ve spent a little time talking about pen-related concerns, we ll move on to considering digital ink and its possible role in your application. By now, you ve gotten the idea that digital ink plays a big part in the Microsoft Tablet PC vision. It s time to turn that idea into concrete examples of how both your application and the user treat digital ink. In the following sections, we explore how digital ink is modeled, manipulated, and rendered.

Ink Modeling

One of the biggest decisions you ll make as an application developer is how to treat ink in your application. We refer to this as ink modeling, which is how the application models digital ink in its overall schema. Before tackling this subject, you must first decide on the purpose of digital ink in your application.

What s Ink Got to Do with It?

Digital ink generally has two purposes in an application. The first, and perhaps most obvious, is the treatment of digital ink as ink. When ink is used for this purpose in an application, users can enter digital ink just as if they were writing on paper. The ink, once entered, is not converted or otherwise changed. When an application keeps digital ink as ink, it is in effect treating its document space like a sheet of paper. Any digital ink used in this way is first order ink, serving no other purpose than to be a digital version of the user s handwritten notes.

Digital ink can also serve another purpose in an application. You might want your application to have second order ink, or ink that exists as an intermediary for some other purpose. Second order ink doesn t stick around long; instead, it is often converted to another data type. Second order ink leverages the pen as a natural form of data entry. It is treated not as an end in itself but as a means to arrive at some other end. Here are two examples of how using second order ink as a natural form of input can make an application better:

  • Ink for spatial layout

    Any application that requires the user to create and spatially arrange items is a good candidate for second order ink. A typical example of such an application is Microsoft Visio, which is a diagramming application. Generating flowcharts and other diagrams in Visio using a mouse can sometimes be tedious. Creating, resizing, and placing shapes are often time-consuming, requiring careful and adept mouse manipulation. The typical user can probably draw a flowchart on a napkin faster than he can create one in Visio. However, imagine if Visio could accept digital ink as a form of input, converting the ink (using reasonably good shape-recognition algorithms) to a nice flowchart either as the user inks or once the user is done. It s a great example of how digital ink can be a natural form of input without being an end in itself.

  • Ink for complex scripts

    Many computer users can type English much faster than they can write it. However, this great imbalance between the throughputs of the keyboard and the pen does not hold true for all languages. In fact, many languages not based on Latin script have complex alphabets that are difficult to type. In such languages, the size of the alphabet dwarfs the number of keys available on a keyboard, requiring users to type characters by using complicated combinations of keys. Worsening the problem, typical words in some of these languages have many homonyms, making phonetic spelling difficult as well. The average inexperienced typist using such a language (Chinese, for example) enters text at a painfully slow speed. Without training, they are often unable to enter text at all. Here digital ink comes to the rescue. Ink can be used as a method of text entry when combined with a good handwriting recognizer. For the average user who wants to enter text in a complex script, digital ink is a much faster alternative to typing. This is another example of how digital ink can be not only a feature but also a significant improvement in a user s computing experience.

Mysterious Ways

Second order digital ink has numerous other uses, limited only by your imagination and your application s needs. Instead of discussing additional uses of second order digital ink, however, we now want to turn our attention back to first order ink, whose purpose once entered is to remain as ink. First order ink can be modeled in your application in at least three ways. We cover each of these ways in the following sections. Figure 2-12 is a simple illustration of the three ink-modeling methods.

figure 2-12 three ways to model ink in an application.

Figure 2-12. Three ways to model ink in an application.

Free-Form Ink

Perhaps the most paperlike of all the ways to model ink in an application, free-form ink lets the user ink anything anywhere in the document. Whether it is drawings, writing, or annotations, the user has complete control over what goes on the document canvas. The application treats ink just as a piece of paper would, which is to say that it places little or no restrictions on how ink is placed on it.

Although this model of digital ink might be appealing, its laissez-faire treatment of ink might not be appropriate for all applications. After all, how many applications could there be whose sole purpose is to simulate digital paper without providing many additional benefits?

You might be interested in adding a free-form inking surface as a component of your application instead of having it be the entire focus. The key to making a successful free-form inking surface is to restrict the user in as few ways as possible.

Annotation Ink

A more likely use of first order digital ink in your application is as a means to annotate documents, especially if you already have an application and you re considering adding some Tablet PC enhancements to it. Your existing application has a document type of its own, which likely consists of anything but digital ink. You might like to add an annotation feature to it; after all, many people print documents to annotate them with a pen. Many applications don t have a means for users to add annotations at all, much less digital ink annotations. Herein lies an opportunity for your application to shine on the Tablet PC.

Successfully modeling annotation ink requires your application to accept ink in an almost free-form manner. Users should feel that they are writing on the document just as they would write on a printed version of it.

Most annotations don t target the document in general; instead, they tend to apply to a specific word, section, page, or other portion of the document. The challenge with annotations is figuring out how to keep them anchored to what they annotate. For instance, if a user circles a sentence in a word processing application, it would be nice if the circle moved with the sentence as the user edited nearby portions of the document. Without this functionality, any edits to the document that cause its content to move around would destroy the meaning of many annotations because they would become detached from their context.

Annotation anchoring need not be difficult, particularly if your application already supports anchored non-ink annotations. If digital ink will be your application s first foray into supporting annotations, you might want to consider how you will anchor those annotations to your application s document content.

Inline Ink

The last way of modeling ink in an application is to treat the ink as another textual element. Putting the ink inline, or within the flow of document text, is a possibility for applications that deal with flowing text (such as word processors). In this model, digital ink is not much more than additional words in the document.

Microsoft Word currently puts ink inline with text, letting the ink flow with the rest of the document content. However, of the three models of digital ink, inline ink is the least compelling. Inline ink does not have a real-world analog that makes a case for common scenarios in which it would be useful. This method is the least like paper, and it is also of questionable value to the user. In your application, you re more likely to model your first order ink as free-form or as annotation.

Ink Interaction

Regardless of how you model digital ink in your application, you will need to decide how to help the users interact with the ink they ve written. Many of the well-established text interaction conventions will have analogs in the digital ink world. For the most part, the suggestions we give here are not revolutionary. Rather, they distill the conclusions of the Tablet PC team s user research down to some general guidelines that will help you design ink-enabled applications that are easy to use.

Common Pen Actions

Before we get into the details behind ink interaction, we should establish a vocabulary of terms that denote common pen actions. In general, literature you read about pen-based computing will adhere pretty closely to the terms listed in Table 2-1. The Tablet PC Platform SDK documentation also uses some of these terms when referring to these pen actions. Table 2-1 contains the terms and definitions for pen actions that we ll be using throughout this book.

Table 2-1. Pen Action Terminology

Term

Action

Hover

The pen stays within the detection range of the digitizer without actually touching the screen. Windows XP Tablet PC Edition maps this action to a mouse movement.

Tap

The pen touches and lifts from the screen within a short amount of time. While touching the screen, it does not travel more than a few pixels (if at all). This action is mapped to a left mouse button click.

Double Tap

The pen taps twice in quick succession, traveling little or no distance between the taps. This action is mapped to a left mouse button double click.

Press-and-Hold

The pen touches the screen and neither lifts nor moves much distance for a set amount of time. When the pen has been held down for that amount of time (which can be adjusted in the Tablet PC Control Panel item), it is lifted from the screen. This action can be mapped to a right mouse button click, which is especially useful if a tablet pen does not have a barrel button.

Hold-Through

The pen begins a press-and-hold action but does not lift when the set amount of time elapses. The pen instead remains held down for even longer. This action is mapped to holding the left mouse button down. Incidentally, this explains why press-and-hold to trigger a right click requires the user to lift the pen within a certain window of time. If holding the pen down for any period of time always generated a right click, there would be no way for the user to simulate holding the left button down (an action required by some user interfaces).

Drag

The pen touches the screen, moves more than a very short distance, and eventually lifts off the screen. This action is mapped to a left mouse button drag.

Hold-Drag

The pen begins a press-and-hold action but then drags when the hold time is reached. This action is mapped to a right mouse button drag.

Lasso

A specific drag action that is meant to select objects within an application. The dragged path indicates a loop that encloses all objects that the user wants to select.

Gesture

Any of a set of patterns traced by the pen. If the pattern is traced without touching the screen, the gesture is said to be an in-air gesture. By moving the pen in a specific pattern, the user can trigger behaviors in an application that expects the gesture. In addition to the in-air variety, some gestures are performed after touching the pen to the screen. In either case, gestures are a way to interact with an application without requiring any visible user interface. They are the pen analog to keyboard shortcuts.

Selecting Ink

Other than creating ink on the Tablet PC, selecting ink is possibly the most important action that a user performs with digital ink. Selection, after all, is a prerequisite for all other ink manipulation actions. Many of the benefits of digital ink, such as being able to change its color and move it around, are predicated on the ink being selectable. Just as text selection in a word processor is critical to its functionality, ink selection in a Tablet PC application is core to the inking experience.

There are, however, major differences in the way that selection is performed, depending on the application and the document type. Selection methods should be based on the characteristics of the document data being selected. Several common document types and their selection methods follow.

  • Simple layout text

    Many applications deal only with simple layout text streams. By simple layout, we mean that given any two words in the document, it is possible to determine without ambiguity which one is first. An example of this type of application is Microsoft Notepad. In Notepad, it s pretty clear that the text is contained in one linear stream and that there is a defined order for each word. The great part about one-dimensional text streams is that their selection mechanisms are easy to learn. By choosing a beginning and an end point, it s obvious which words are selected and which aren t. Most simple layout text selection mechanisms display selection by inverting the color of the text and its background.

  • Complex layout text

    In a complex layout text document, it might not always be easy for a user to determine the relative order of any two particular words. In addition, complex layout text documents can often have mixed context, such as images and other objects interspersed with the text. An example of this type of application is a Web browser, in which text can be laid out in different frames on screen along with images. This type of layout puts clusters of words at various locations on screen. The user is often unable to guess the real order of these clusters, creating a unique kind of challenge when simple layout text selection mechanisms are applied to complex layout text documents. Try selecting a few clusters of text from a complicated Web page, and you ll quickly discover that it s rather unpredictable which clusters get selected. The problem is that the application has an internal ordering for the clusters, but this ordering isn t exposed visually to the user. The solution to this problem is to let go of the simple layout selection mechanisms, which are inadequate in this case, and instead to support a more appropriate mechanism. However, most complex layout text applications still use simple layout selection.

  • Two-dimensional canvas

    Outside the text-processing world, a host of applications use a document model that is best described as a two-dimensional canvas. A good example of this type of application is an image editor such as Adobe Photoshop. These applications present a flat canvas from which the user can select areas. The richness of their selection model varies with the type of selection tools they provide. The most basic area selection tool is the rectangular selection tool, which when dragged selects a rectangle from the canvas. More advanced tools include ellipses, polygons, and even free-form selection tools that select any closed loop area the user draws.

  • Two-dimensional object-based

    Related to the two-dimensional canvas document is the two-dimensional object-based document. The difference is that two-dimensional object-based applications do not allow the user to select just any part of the document surface. Instead, their documents consist of individual objects laid out in two dimensions. These objects, and not the document surface itself, can be selected. The Windows desktop is an example of sorts of a two-dimensional object-based document. You can drag out a selection rectangle on it, which then selects all icons that fall within the rectangle.

Documents with digital ink in them are usually best described as being in the two-dimensional object-based category. However, traditional two-dimensional object-based selection mechanisms need to be adjusted to handle some challenges specific to digital ink.

The first and perhaps most essential deviation from traditional selection mechanisms is that digital ink often selects poorly when using a rectangular selection tool. Figure 2-13 shows a common difficulty with using a rectangular selection tool on ink. The crux of the problem is that we usually don t write perfectly straight, using exact margins. The free-form nature of ink tends to create amorphous groups of ink instead of rectangular blocks, making rectangle-based selection tools difficult to apply.

figure 2-13 using a rectangular selection tool to select digital ink is sometimes a challenge. how would you use a rectangular selection tool to select only the darker ink?

Figure 2-13. Using a rectangular selection tool to select digital ink is sometimes a challenge. How would you use a rectangular selection tool to select only the darker ink?

It s better to use a free-form selection tool when selecting digital ink. A free-form selection tool allows the user to draw a loop that encloses only everything that should be selected. We discuss free-form (or lasso) selection in greater detail in Chapter 4 and Chapter 6.

The second deviation from traditional selection mechanisms comes in the way the selection of an object is shown. Some two-dimensional object-based applications show that objects are selected by surrounding them with a selection box while not altering the object s original appearance. An example of selection boxes, taken from Visio, is shown in Figure 2-14. The difficulty, as apparent in the figure, is seeing exactly which objects are selected. When many objects overlap, seeing which ones are selected can sometimes be nearly impossible.

figure 2-14 is the gray oval in the middle selected as well as the two outer ellipses?

Figure 2-14. Is the gray oval in the middle selected as well as the two outer ellipses?

The way to avoid this problem is to make sure that selected objects are visually distinguishable from unselected objects. The Windows Desktop, for instance, indicates that an icon is selected by imbuing it with a selection color (usually blue). This visual difference makes it easier to tell whether something is selected, even if other objects are nearby or partially overlapping. Having a visual difference is even more important with digital ink because ink strokes often cross and overlap one another.

We end this section with one final note about free-form selection of ink. An issue particular to digital ink selection that comes up in usability tests is the tendency for users to be somewhat sloppy in using lasso selection tools. Instead of carefully corralling the ink in a neat little loop, users tend to quickly circle approximately what they want. If ink strokes are ruled to be in or out of the loop based on whether they are completely contained within the loop, some strokes near the edges of the loop might be inadvertently excluded from the selection. Your application can help the user select ink quickly and effectively in two ways:

  • Establish a stroke selection threshold

    Instead of selecting those strokes that are wholly contained in the lasso (or conversely, selecting all strokes that have any part within the lasso), consider using a percentage-based selection threshold. For instance, you might say that the lasso selects all strokes that fall at least 60 percent within the lasso. The interesting part is in calculating whether a stroke meets this criterion. Because two strokes that look identical can contain a different number of points (depending on how fast the stroke was drawn), a perfect percentage-based calculation is hard to arrive at. Further complicating the issue is pressure-sensitive ink, which can be thicker in some parts and thinner in others. Fortunately, the Tablet PC Platform SDK provides a simplified algorithm for lasso selection. This algorithm, exposed through the lasso HitTest method, determines whether an ink stroke is selected based on the percentage of its points that fall within the lasso.

  • Support word-based selection

    A user often will select a word and accidentally miss the dot of an i or some other small stroke in the word. When selecting written ink, the user most likely wants to work with whole words, not just individual strokes within a word. To help the user, you might consider offering word-based selection, in which an entire word not the individual strokes falls within or outside the lasso. This approach makes it easy for the user to quickly select and manipulate words, instead of having to carefully make sure that dots and dashes aren t omitted from the selection. In Chapter 7, we ll explain how the Ink Recognition API in the Tablet PC Platform SDK helps you determine which ink strokes belong to the same word.

Other Ink Interactions

In addition to selecting ink, there are several other ink interactions that your application might support. We briefly cover a few of the more common interactions and the pitfalls to avoid when implementing them.

Moving and Resizing

Once ink has been selected, the user might want to move or resize it. Moving the ink is straightforward the user should be able to directly drag the ink from one location to another, instead of, say, using the arrow keys on a keyboard to move selected ink. Dragging the ink is especially convenient because the user will most likely be holding a pen and not using a keyboard when entering ink on a tablet. If your application supports resizing of selected ink via resize handles, be sure that they are big enough to be easily targeted by a pen.

Formatting

There isn t an official list of recommended ink formatting settings that every application should expose. However, users will expect the most basic formatting variables (such as color and thickness) to be settable. Some of the more advanced formatting options that the Tablet PC Platform SDK supports include pressure sensitivity and the shape of the pen tip. The user might expect these, too, when writing in a Tablet PC application. Some throwbacks from font formatting conventions include gimmicks such as bold and italic. However, while it is fairly easy to implement bold and italic by applying scale and shear transforms to the ink, the utility of such functionality is questionable. After all, the user can write bold or italicized ink fairly easily without the application s help. But in a Tablet PC application, the user should be able to set color and thickness as well as pressure sensitivity and pen tip shape.

An alternative to exposing these raw settings is to offer a set of virtual pens, each with its own implicit settings. For instance, you could offer fine blue ballpoint, medium black square-tip marker, and yellow highlighter as three virtual pens. This approach sacrifices precise control of pen formatting for the convenience of having a stash of commonly used pens. Whether you choose to offer virtual pens or to let the user control the pen settings, be sure to give the user some way to format the ink. Ink formatting adds a sense of depth and completeness to the user s perception of your application running on the Tablet PC.

Gestures

Pen gestures can be an effective way to interact with an application. Particularly because pen gestures can be performed anywhere, without triggering UI functions, they can be as efficient as keyboard shortcuts for the user who is familiar with them. However, gestures have some of the same usability concerns as keyboard shortcuts. For one, they are hard to discover (that is, the user might not know of their existence because they do not have associated UI elements). If an application accepts a lot of gestures, it might be hard for the user to perform the gestures distinctly and for the gesture recognizer to tell the many gestures apart.

Besides poor discoverability and gesture overload, a serious threat to successful gesture-driven features is the accidental triggering of gestures. Unlike keyboard shortcuts, which require deliberate combinations of keys to be pressed, gestures can be performed unintentionally merely by waving the pen around or by inking something that resembles a gesture. The chance of accidentally triggering a gesture increases with the number of gestures an application uses, adding to the problem. For these reasons, you must take great care when deciding whether to support gestures, and if you do, which features they should actuate.

TIP
Consider associating gestures only with nondestructive actions so that unintentional gestures do not yield devastating results.

Ink Realism

We ve explained how you can model and interact with digital ink in your application. Now we ll take a look at how you can make ink more realistic. Ink realism is a key part of what Tablet PCs are all about. In trying to mimic the experience of pen and paper, the Tablet PC Platform goes to great lengths to improve the capture and appearance of digital ink. We ll see what you can do to improve the user s inking experience as well as what the Tablet PC Platform does to make digital ink realistic. We ll also give you some tips that will make your application a great one for inking in.

Right Here, Right Now

One facet of ink realism is its immediacy. To match the utility of paper, digital ink must be captured in real time, as the user is writing. Any sort of lag will impede the user s thought process, reducing the effectiveness of inking on a tablet. Two sources of lag exist in applications:

  • Packet processing lag

    The Tablet PC Platform sends notifications of newly captured ink. These notifications are sent to an application whenever new points are captured in the middle of an ink stroke. If the application processes these new points (packets) on its own, it is expected to render the partially drawn stroke as well. A lag occurs if there s a noticeable time lapse between the time the notification is sent and when the partial stroke is finally drawn.

  • Application responsiveness lag

    The Tablet PC Platform also sends notifications when a user begins a new ink stroke. Applications can sometimes take a long time to respond to these notifications, creating a noticeable delay between when the pen first touches the screen and when its ink gets rendered.

There s plenty of good news when it comes to ink immediacy on a Tablet PC. By default, the Tablet PC Platform tries to take care of both these problems for you. The standard ink collection facilities available in the Platform, InkCollector and InkOverlay, process packets and new ink strokes automatically. Their default processing for packets and new strokes is reasonably fast, introducing little to no lag in typical situations. If you use them without modification, they should provide a good inking experience for the user. We will cover InkCollector and InkOverlay in more depth in Chapter 4.

At times, you might need to do some of your own processing of ink notifications sent by the Tablet PC Platform, either in addition to or in lieu of the default processing. In these cases, make sure that your packet processing code is minimal and fast so that the user will not perceive a delay in inking. Periodic delays, in which packets occasionally take much longer to process, can be even more disturbing for the user, so try to avoid them if possible.

Curves Ahead

Another facet of ink realism is the appearance of the ink itself. On physical paper, ink strokes are smooth and continuous. Fine nuances are littered throughout, such as the thinning of a stroke as the pen lifts. These numerous and subtle nuances cause us to expect that using digital ink will be a bit more involved than simply connecting some dots on the screen.

The Tablet PC Platform provides several simple optional features to make digital ink more realistic. A brief mention of each follows.

B zier Curve Fitting

One of the biggest improvements to digital ink that the Tablet PC Platform provides is support for B zier curve fitting. If you simply took all the points captured by a digitizer and connected the dots, you would come up with an ink stroke that was fairly jagged in areas where the pen moved quickly. The reason is that the sampling rate of the digitizer is only so fast. If you move quickly enough, the digitizer will be able to sample only one point for every few pixels you move. When these sparsely sampled points are connected, they leave stretches of straight-line segments, making the ink stroke appear jagged or full of kinks.

Curve fitting is the process of taking some points and figuring out a smooth curve that passes near all the points. Instead of taking the digitizer at its word, curve fitting assumes that the user wrote fairly smoothly without sudden changes in direction. The Tablet PC Platform has an option to render ink strokes using curve-fitted points instead of the originally collected digitizer points. This option improves the overall appearance of the ink tremendously.

Rest assured that turning on curve fitting won t just round everything out. The algorithm used is smart enough to detect inflection points, or cusps, in the ink stroke. It preserves the natural sharpness of cusps while smoothing out the rest of the ink with curve fitting.

The Tablet PC Platform fits points onto B zier curves. B zier curves are only one of many types of curves that can be used for this purpose. They were chosen for their simplicity. B zier curves are quite common in graphics software and are used heavily by digital artists and computer games designers alike. We won t go into the details of B zier curves in this book, but for your viewing pleasure an example of an unassuming B zier curve is provided in Figure 2-15.

figure 2-15 a b zier curve. b zier curves use a number of control points that affect the appearance of the curve. all four control points of the curve are shown.

Figure 2-15. A B zier curve. B zier curves use a number of control points that affect the appearance of the curve. All four control points of the curve are shown.

Antialiasing

Even after fitting an ink stroke to a curve has smoothed it out, the edges of the stroke might still appear to be slightly rough. This roughness is caused by the size of the screen s pixels, which are big enough for the eye to make out individually. Because some pixels are part of the ink stroke and others (presumably the background) are not, there is a jagged steplike appearance at the edge of a stroke.

To reduce this roughness, antialiasing of ink strokes is supported in the Tablet PC Platform. Antialiasing is the process by which pixels on the border between two colors are set to an intermediate color somewhere between the two original colors. When viewed from a reasonable distance, this blending of colors makes for a smooth appearance. Figure 2-16 shows an example of what antialiasing can do for the appearance of a curve.

figure 2-16 a circle shown both normally (left) and antialiased (right). the technique is easier to see in these magnified circles. at normal size, the antialiased circle will look smoother.

Figure 2-16. A circle shown both normally (left) and antialiased (right). The technique is easier to see in these magnified circles. At normal size, the antialiased circle will look smoother.

Pen Tip Shape

To add a subtle enhancement to the realism of digital ink, two pen tips are supported. You can ask the Tablet PC Platform to render ink as if it were drawn using either a round-tipped pen or a rectangular-tipped pen. A round-tipped pen simulates a ballpoint pen: the ends of ink strokes are semicircular, and inflections in the stroke have rounded edges to them. A rectangular-tipped pen, on the other hand, simulates the appearance of felt-tipped markers that have rectangular tips. Edges of a stroke drawn by a rectangular-tipped pen are straight, and inflections have straight edges as well. Ink drawn with the two types of pen tips is shown in Figure 2-17.

figure 2-17 ink strokes drawn with the round tip and the rectangular tip appear markedly different from each other.

Figure 2-17. Ink strokes drawn with the round tip and the rectangular tip appear markedly different from each other.

Pressure Sensitivity

In addition to two types of pen tips, the Tablet PC Platform can also simulate pressure-sensitive pens. The reason for this is that some pens draw differently depending on the amount of pressure applied to the pen during the stroke. Because many tablets will have hardware support for detecting the pressure used on a pen, the Tablet PC Platform exploits the opportunity to add another facet to digital ink s realism. If you ask the Tablet PC Platform to use the pressure information gathered from a digitizer that supports pressure, it will render ink strokes according to the pressure that was used to generate them. Areas in which greater pressure was applied will appear thicker, and areas in which lighter pressure was applied will appear thinner. Figure 2-18 shows a stroke that was captured with pressure sensitivity turned on.

figure 2-18 a pressure-sensitive stroke. notice how the end of the stroke appears as though the pen were lifted off the tablet in a quick motion.

Figure 2-18. A pressure-sensitive stroke. Notice how the end of the stroke appears as though the pen were lifted off the tablet in a quick motion.

Subtractive Color Rendering

The last enhancement to the appearance of digital ink drawn by the Tablet PC Platform affects transparent strokes. Ink can be drawn with a degree of transparency, giving it the appearance of a light-colored marker or highlighter. When two highlighters of different colors are mixed on a sheet of paper, the resulting color of the overlapping areas is different from that produced by mixing two colors on a computer screen.

The reason for this difference lies in the color model that s used. A color model is a system of fundamental colors that can be intermixed in various proportions to produce all other colors. An example of this is the RGB (red-green-blue) color model used on computers. When mixing colors in the RGB model, each color you mix in adds to the final color s value. Because of this, the RGB color model is said to be additive. In the RGB model, you get white when you mix the three fundamental colors together in equal proportions.

In stark contrast are subtractive color models, so called because each additional color that s mixed in subtracts from the others already present. When you mix the fundamental colors of a subtractive color model in equal proportions, you get black, not white. A popular subtractive color model is CMYK (cyan-magenta-yellow-black). The CMYK color model is commonly used when printing on paper (magazines, newspapers, ink-jet printers, and so forth). Examples of additive and subtractive color models, albeit less compelling in grayscale, are shown in Figure 2-19.

figure 2-19 the rgb color model, on the left, mixes red, green, and blue to make white. the cmyk model mixes cyan, magenta, and yellow to make black.

Figure 2-19. The RGB color model, on the left, mixes red, green, and blue to make white. The CMYK model mixes cyan, magenta, and yellow to make black.

When mixing semitransparent ink with underlying colors, the Tablet PC Platform uses a subtractive color model, yielding much more realistic results. If you mix enough colors of semitransparent ink, you ll get black, just like on real paper. This subtlety is a nice addition to the realism of the ink that s rendered.

NOTE
Black is a purely practical member of the set, with no theoretical basis for its membership. It s needed because typical printing processes don t produce a solid black when cyan, magenta, and yellow are mixed.



Building Tablet PC Applications
Building Tablet PC Applications (Pro-Developer)
ISBN: 0735617236
EAN: 2147483647
Year: 2001
Pages: 73

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net