(Image) Add support for 9-patch images 34/19434/1
authorDavid Steele <david.steele@partner.samsung.com>
Thu, 3 Apr 2014 17:38:11 +0000 (18:38 +0100)
committerVictor Cebollada <v.cebollada@samsung.com>
Fri, 11 Apr 2014 14:19:49 +0000 (15:19 +0100)
commit3cc0f2d0472ec32adb2cf40a4c00dafbda04641c
treec542b4ce5d029fd233a5ff3ec44a435e819fb611
parentfd9e293d3061867757984a0e2ffb913173a8aa6f
(Image) Add support for 9-patch images

[Issue#]       N/A
[Problem]      There is no support for 9 patch images with the
stretch / child info information stored in a 1 pixel border within
the image
[Cause]        N/A
[Solution]     Added new class NinePatchImage, which is automatically
used by Image::New when a 9 patch filename is seen.

Adding a 9 patch image to an ImageActor via an Image handle will generate
an alternative BitmapImage with the border cropped out. It will set up the
ImageActor to use the 9 patch style and set the stretch areas up appropriately.

Adding a 9 patch image to an ImageActor via a NinePatchImage handle will
use the image as is (i.e. without the border cropped out).

[Verification] Build Repo

Change-Id: I8fa5cc34220ea9abcf085c600279ef92bc12da00
Signed-off-by: David Steele <david.steele@partner.samsung.com>
18 files changed:
automated-tests/dali-test-suite-utils/test-platform-abstraction.h
dali/integration-api/platform-abstraction.h
dali/integration-api/resource-cache.h
dali/internal/event/actors/image-actor-impl.cpp
dali/internal/event/actors/image-actor-impl.h
dali/internal/event/images/bitmap-image-impl.cpp
dali/internal/event/images/bitmap-image-impl.h
dali/internal/event/images/image-impl.cpp
dali/internal/event/images/image-impl.h
dali/internal/event/images/nine-patch-image-impl.cpp [new file with mode: 0644]
dali/internal/event/images/nine-patch-image-impl.h [new file with mode: 0644]
dali/internal/file.list
dali/internal/render/common/texture-cache-dispatcher.h
dali/public-api/dali-core.h
dali/public-api/file.list
dali/public-api/images/nine-patch-image.cpp [new file with mode: 0644]
dali/public-api/images/nine-patch-image.h [new file with mode: 0644]
dali/public-api/images/pixel.cpp