From ce9d6e8ad28b2d84d1a292a871c23b66a4654b54 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 13 Apr 2021 11:30:50 -0400 Subject: Add new guile-sdl2 and chickadee releases. --- manuals/chickadee/9_002dPatches.html | 131 +++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 manuals/chickadee/9_002dPatches.html (limited to 'manuals/chickadee/9_002dPatches.html') diff --git a/manuals/chickadee/9_002dPatches.html b/manuals/chickadee/9_002dPatches.html new file mode 100644 index 0000000..270ee0e --- /dev/null +++ b/manuals/chickadee/9_002dPatches.html @@ -0,0 +1,131 @@ + + + + + + +9-Patches (The Chickadee Game Toolkit) + + + + + + + + + + + + + + + + + + + +
+

+Next: , Previous: , Up: Graphics   [Contents][Index]

+
+
+

2.3.4 9-Patches

+ +

A 9-patch is a method of rendering a texture so that it can be +stretched to cover an area of any size without becoming distorted. +This is achieved by dividing up the sprite into nine regions: +

+ + +

The most common application of this technique is for graphical user +interface widgets like buttons and dialog boxes which are often +dynamically resizable. By using a 9-patch, they can be rendered at +any size without scaling artifacts. +

+
+
Procedure: draw-nine-patch texture rect [#:margin 0] [#:top-margin margin] [#:bottom-margin margin] [#:left-margin margin] [#:right-margin margin] [#:mode stretch] [#:origin] [#:scale] [#:rotation] [#:blend-mode] [#:tint white]
+
+

Draw a 9-patch over the area rect using texture whose +stretchable/tileable patches are defined by the given margin +measurements. The corners are never stretched/tiled, the left and +right edges will be stretched/tiled vertically, the top and bottom +edges may be stretched/tiled horizontally, and the center may be +stretched/tiled in both directions. +

+

mode may be either stretch (the default) or tile. +

+

margin specifies the margin size for all sides of the 9-patch. +To make margins of differing sizes, the top-margin, +bottom-margin, left-margin, and right-margin +arguments may be used. +

+

Refer to draw-sprite (see Sprites) for information about +the other arguments as they are the same. +

+ + + + + + -- cgit v1.2.3