Draw 9-patch | Android Developers
来源:百度文库 编辑:神马文学网 时间:2024/05/29 03:44:34
Draw 9-patch
The Draw 9-patch tool allows you to easily create aNinePatch graphic using a WYSIWYG editor.
For an introduction to Nine-patch graphics and how they work, please read the section on Nine-patch in theNinepatch Images topic.
Here's a quick guide to create a Nine-patch graphic using the Draw 9-patch tool. You'll need the PNG image with which you'd like to create a NinePatch.
From a terminal, launch the draw9patch application from your SDK /tools directory.
Drag your PNG image into the Draw 9-patch window (or File > Open 9-patch... to locate the file). Your workspace will now open.
The left pane is your drawing area, in which you can edit the lines for the stretchable patches and content area. The right pane is the preview area, where you can preview your graphic when stretched.
Click within the 1-pixel perimeter to draw the lines that define the stretchable patches and (optional) content area. Right-click (or hold Shift and click, on Mac) to erase previously drawn lines.
When done, select File > Save 9-patch...
Your image will be saved with the .9.png file name.
Note: A normal PNG file (*.png) will be loaded with an empty one-pixel border added around the image, in which you can draw the stretchable patches and content area. A previously saved 9-patch file (*.9.png) will be loaded as-is, with no drawing area added, because it already exists.
Optional controls include:
Zoom: Adjust the zoom level of the graphic in the drawing area.
Patch scale: Adjust the scale of the images in the preview area.
Show lock: Visualize the non-drawable area of the graphic on mouse-over.
Show patches: Preview the stretchable patches in the drawing area (pink is a stretchable patch).
Show content: Highlight the content area in the preview images (purple is the area in which content is allowed).
Show bad patches: Adds a red border around patch areas that may produce artifacts in the graphic when stretched. Visual coherence of your stretched image will be maintained if you eliminate all bad patches.
The Draw 9-patch tool allows you to easily create aNinePatch graphic using a WYSIWYG editor.
For an introduction to Nine-patch graphics and how they work, please read the section on Nine-patch in theNinepatch Images topic.
Here's a quick guide to create a Nine-patch graphic using the Draw 9-patch tool. You'll need the PNG image with which you'd like to create a NinePatch.
From a terminal, launch the draw9patch application from your SDK /tools directory.
Drag your PNG image into the Draw 9-patch window (or File > Open 9-patch... to locate the file). Your workspace will now open.
The left pane is your drawing area, in which you can edit the lines for the stretchable patches and content area. The right pane is the preview area, where you can preview your graphic when stretched.
Click within the 1-pixel perimeter to draw the lines that define the stretchable patches and (optional) content area. Right-click (or hold Shift and click, on Mac) to erase previously drawn lines.
When done, select File > Save 9-patch...
Your image will be saved with the .9.png file name.
Note: A normal PNG file (*.png) will be loaded with an empty one-pixel border added around the image, in which you can draw the stretchable patches and content area. A previously saved 9-patch file (*.9.png) will be loaded as-is, with no drawing area added, because it already exists.
Optional controls include:
Zoom: Adjust the zoom level of the graphic in the drawing area.
Patch scale: Adjust the scale of the images in the preview area.
Show lock: Visualize the non-drawable area of the graphic on mouse-over.
Show patches: Preview the stretchable patches in the drawing area (pink is a stretchable patch).
Show content: Highlight the content area in the preview images (purple is the area in which content is allowed).
Show bad patches: Adds a red border around patch areas that may produce artifacts in the graphic when stretched. Visual coherence of your stretched image will be maintained if you eliminate all bad patches.
Draw 9-patch | Android Developers
Localization | Android Developers
Widget Design Guidelines | Android Developers
Available Resource Types | Android Developers
Facebook Developers | Facebook Developers New...
CD -- CGM Draw Documentation
Netbackup Patch说明宝典
GPS patch antenna simulation - yuhenzc...
android - Build Android Platform
Flowers you draw on my back...
POLAR Draw V2.02 Build 2003.03.24
Draw Anywhere - easy online diagramming, flow chart
Linux下patch的制作和应用
diff和patch使用指南 - Linux天空
Unicode Patch for Flex-2.5.4
Examples from The Java Developers Almanac 1.4
华硕计划9月台湾推出首款Android手机
Android G1
android 概述
Android操作系统
Android 简史
android 博客
Android操作系统
Android 简史