Merge lp:~fboucault/ubuntu-ui-toolkit/document_bitmaps_suffixes into lp:ubuntu-ui-toolkit

Proposed by Florian Boucault
Status: Merged
Approved by: Tim Peeters
Approved revision: 434
Merged at revision: 436
Proposed branch: lp:~fboucault/ubuntu-ui-toolkit/document_bitmaps_suffixes
Merge into: lp:ubuntu-ui-toolkit
Diff against target: 47 lines (+29/-8)
1 file modified
modules/Ubuntu/Components/resolution-independence.qdoc (+29/-8)
To merge this branch: bzr merge lp:~fboucault/ubuntu-ui-toolkit/document_bitmaps_suffixes
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Ubuntu SDK team Pending
Review via email: mp+159909@code.launchpad.net

Commit message

Added documentation for bitmap suffixes in the resolution independence page.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'modules/Ubuntu/Components/resolution-independence.qdoc'
2--- modules/Ubuntu/Components/resolution-independence.qdoc 2013-02-26 10:30:04 +0000
3+++ modules/Ubuntu/Components/resolution-independence.qdoc 2013-04-20 01:54:26 +0000
4@@ -90,14 +90,35 @@
5
6 Vector graphics, fonts and programmatically drawn elements will usually scale well
7 to the different devices. On the other hand, bitmaps will typically require a bit
8- more care. We require that for each bitmap the developer provides the highest
9- resolution version of it. The system will perform a high quality downscaling of the
10- bitmap when needed on lower density screens.
11-
12- For example, if the destination size of the bitmap is 10 gu * 10 gu and the developer
13- targets a smart phone with 4 inch HD (720x1,280px) screen (1 gu = 18 px) and a tablet
14- with 10 inch HD screen (1 gu = 10 px) then he/she only needs to create a bitmap of
15- 180 px * 180 px to support both devices.
16+ more care.
17+
18+ The size of a bitmap needs to be adequate to render well on a given
19+ device. The toolkit allows to design multiple versions of a bitmap and choose
20+ the appropriate one dynamically depending on the device the application is
21+ being run on.
22+ In order to know for what target device a given version of a bitmap was
23+ produced, we define a file naming convention based on the number of pixel
24+ per grid unit of the device.
25+
26+ Example:
27+
28+ If the target device the bitmap is produced for has 10 pixels per
29+ grid unit, then the file name of the bitmap should be suffixed with @10:
30+ \e my_bitmap.png should be renamed to \e my_bitmap@10.png.
31+
32+
33+ In order to support the highest possible resolution devices on the market, we
34+ recommend to always design bitmaps for a device that would have 30 pixels per
35+ grid unit (@30 suffix). The system will perform a high quality downscaling of
36+ the bitmap when needed on lower resolution screens.
37+
38+ Example:
39+
40+ If the destination size of the bitmap is 10 gu * 10 gu and the developer
41+ targets a device that has 18 pixels per grid unit (1 gu = 18 px), the bitmap
42+ should still be created as if 1 gu = 30 px which results in a 300 px * 300 px
43+ bitmap. When testing on the device the bitmap will be downscaled by a factor
44+ of 30 / 18 = 1.66667.
45
46
47 \part Fonts

Subscribers

People subscribed via source and target branches

to status/vote changes: