Surface
From FusionWiki
| Surface | |
|---|---|
| General Information | |
| Author: | Lukas Meller |
| Release Date: | 2010 |
| Status: | Released |
| Last updated: | Unknown |
| Version: | 1.0 |
| Build: | |
| Developer-only: | No |
| Website: | Not available |
| Download: | Direct |
| Runtime Versions | |
| HWA: | Yes (No support) |
| Flash: | Yes (Limited features) |
| Java: | No |
| Java Mobile: | No |
| Vitalize!: | No |
| Unicode: | No |
The Surface object is a graphical extension that allows the user to draw and modify images at runtime. It is the unofficial successor to Overlay Redux.
Contents |
Main features
- Basic drawing tools, e.g. set pixel or flood fill
- Drawing shapes and custom polygons with color or fill data (see below)
- Transparency via transparent colors and alpha channels
- Switching between and adding multiple images at runtime
- Loading images from files: AVI, BMP, GIF, JPEG, PCX, PNG, TGA
- Saving images to files: BMP, JPEG, PNG
- Interacting with the clipboard
- Blitting (pasting) from or to the Surface (e.g. from an Active Object)
- Applying adjustments (e.g. making the image brighter) easily
- Looping through images with a callback
Fill data
Fill data is a part of MMF's programming library and utilized by many of the core objects. By drawing a shape with fill data, each pixel is given a different color which is calculated based on a formula. This formula can utilize the coordinates of the pixel, which is used for gradients. Before fill data can be used, it has to be created. Each fill data is identified by a name. The Surface object supports several types of fill data:
- Color
- A solid color - Much similar to the traditional drawing tools that utilize color
- Linear gradient
- An either horizontal or vertical gradient
- Radial gradient
- A circular gradient starting in the middle of the shape
- Tiled image
- An image (In the Surface object's local image bank) that is tiled like a Quick Backdrop
Usage
This example renders an ellipse with a radial gradient. The result is shown below.
| 1 |
Visual examples
Since the extension has a wide range of features, many people don't know what they actually do. Here are a few examples of what can be achieved.
Flash support
The Flash version of the Surface object is rather limited. As of now, it supports:
- "Polygons" sub-menu
- "With color" sub-menu
- Adding/Deleting images at runtime
- Resize, Rotate, Reverse X/Y
- Alpha channels
- Partial fill data support
- A lot of expressions and conditions
