Vector graphics are defined geometrically by points, lines, curves, and surfaces, instead of using pixels as in a bitmap. As monitors for computers incorporate higher resolution displays, there is a need to move away from bitmaps, which show large pixels when viewed at a high resolution. The resizing of bitmaps can be awkward, and they generally lead to poor-quality graphics. Vector graphics remain smooth when viewed at a high resolution, and remain sharp when resized larger. For this reason, vector graphics are easier to customize around content, because you do not have to create multiple images at different sizes—for example, icon files that appear in the user interface (UI) at various sizes. Other benefits of vector graphics include the following:
-
True content scaling Vector graphics built into flexible layout can resize elegantly based on content. For example, when you add text to a button, the button will resize accordingly without compromising the fidelity of the graphic.
-
Resolution independence The resolution of displays has been gradually increasing and will likely continue to do so. Without the ability to scale an application's UI, the UI just becomes smaller as the resolution increases, typically becoming unusable when the content appears so small that it becomes unreadable. If you apply a scaling or rotation transform with these APIs, it affects only the drawings. There is no effect on the sizes and positions of controls in the window. You can scale drawings, but you can't easily scale the way that a window's space is carved up by controls. Because Windows Presentation Foundation (WPF) composes all the controls in the window as a single drawing, instead of segregating each control to its own region, it is easy to apply scaling or rotation transformations to the UI as a whole. Thus, because you can scale any WPF UI up or down, WPF applications are effectively resolution-independent. Images remain sharp and clear, instead of the blur you would expect from simple bitmap scaling.
Note: |
|---|
|
When setting size-related properties in WPF applications (such as those created by using Expression Blend), pixels refer to device-independent pixels or device-independent units that are equivalent to the size of a pixel on a monitor when it is set to a screen resolution of 96 DPI. Each unit is approximately 1/96 inch, regardless of monitor size or screen resolution.
|
In Expression Blend, a vector object can be as simple as a line or shape, or as complex as a path or control. Objects can be modified in many ways by using on-object handles for resizing, moving, rotating, flipping, or skewing objects, or using the Properties panel where you can enter precise values for size, position, and rotation. Basically, every object you draw onto the artboard is in vector format except for those items that you've added to your project that weren't originally in vector format, such as images and 3D textures. Some of the vector objects in Expression Blend include the following:
Back to top