You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/asciidoc/tutorials.adoc
+11-7
Original file line number
Diff line number
Diff line change
@@ -439,7 +439,10 @@ is equivalent to `<engine-builder type="EhCacheEngineBuilder">`.
439
439
=== Applying sprites best practice
440
440
441
441
You can easily apply your sprites in http://www.w3schools.com/css/css_image_sprites.asp[css].
442
-
However, combining your images takes time. This tutorial shows how WUIC help developers to generate sprites.
442
+
However, combining your images takes time. This tutorial shows how WUIC helps developers to generate sprites.
443
+
444
+
CAUTION: WUIC can pack a set of `PNG` image only. Other format like `JPEG` will be just ignored by the `ImageAggregatorEngine`.
445
+
Consequently if you want to include image in a format other than `PNG` you will need to convert them before.
443
446
444
447
=== The heap to gather your images
445
448
@@ -483,12 +486,13 @@ the generation of javascript sprites.
483
486
</engine-builders>
484
487
----
485
488
486
-
Where you finally import your "img" workflow, you can use in Javascript WUIC_SPRITE['img_foo'] and WUIC_SPRITE['img_bar'] to get an object with following properties:
487
-
- x: x-position from the left inside the merged image
488
-
- y: y-position from the top inside the merged image
489
-
- w: the image width
490
-
- y: the image height
491
-
- url: the image URL
489
+
Where you finally import your `img` workflow, you can use in Javascript `WUIC_SPRITE['img_foo']` and `WUIC_SPRITE['img_bar']` to get an object with following properties:
490
+
491
+
* x: x-position from the left inside the merged image
492
+
* y: y-position from the top inside the merged image
493
+
* w: the image width
494
+
* y: the image height
495
+
* url: the image URL
492
496
493
497
For http://gwennaelbuchet.github.io/SceneGraph.js[SceneGraph] users, you can use this https://github.com/wuic/wuic-samples/blob/wuic-0.5.x-snapshot/js-sprite-sample/src/main/webapp/cgsg/ext/WUICCGSGNodeImageFactory.js[factory]
0 commit comments