Surface Objectとは
Overlay Reduxに似たオブジェクト。文字の描画も可能でClearTypeを掛けることも出来ます。
作成者 | Looki |
---|---|
バージョン | 1.5 Beta(2013年05月06日) |
対応ランタイム | Windows,SWF,HWA |
入手方法
以下のリンクからダウンロードして下さい。
- Surface object
- Surface Object - Page 48
ベータ版。- clickteam.info - /looki/Extensions/Beta/
フォーラム内DL先直リンク
- clickteam.info - /looki/Extensions/Beta/
使用例
以下のリンクからダウンロードして下さい。
http://castles-of-britain.com/SurfaceObjectExamples.zip
コマンド解説
オブジェクト設定
Image bank
Images | |
---|---|
Use multiple images | Use multiple images. Actions to manage multiple images will be provided. |
Load first image on start | Load first image on start. Loads and displays image 0 ifavailable on start. |
Select new images | Select new images. When an image is added. it is automatically selected as the editing image. |
Display editing image | Display editing image. ”Set current image" will not be available and the editing image is drawn instead. |
Settings
Use absolute coordinates | Use absolute coordinates. Coordinates are not relative to the surface position. |
---|---|
Keep points after drawing | Keep points after drawing. The polygon points will be kept after drawing one. |
Threaded file input/output | Threaded file input/output. If checked. the application does not freeze while a file is being loaded or saved. |
条件
I/O | |||||
---|---|---|---|---|---|
Image in clipboard? | Returns true if an image available to be loaded into the Surface object is in the clipboard. | ||||
Loading failed? | Triggered when loading from a file or the clipboard has failed (e.g. because there is no image in the clipboard). | ||||
Saving failed? | Triggered when saving to a file or the clipboard has failed (e.g. because the user has no right to create a file). | ||||
Loading succeeded? | Triggered when loading from a file or the clipboard has succeeded. | ||||
Saving succeeded? | Triggered when saving to a file or the clipboard has succeeded. | ||||
File I/O in progress? | Returns true when an image is being loaded or saved in the threaded file I/O mode. See Threaded file input/output. | ||||
Buffer is locked? | Returns true if the buffer of an image is currently locked (and no error occured). See Lock buffer. | ||||
Fill data | |||||
Fill data exists? | Returns true if the specified fill data exists, i.e. if it was created by one of the actions in the Fill Data sub-menu. | ||||
Image | |||||
Compare to current image | Returns the result of the comparison. | ||||
Compare to editing image | Returns the result of the comparison. | ||||
Set editing image(inline) | Equivalent to the action with the same name, Set editing image. The editing image can be set between two conditions for convenience. The condition always returns true. | ||||
Has alpha channel? | Returns true if the image has an alpha channel. | ||||
Pixel is equal to color? | Returns true if the given pixel has the specified color. | ||||
Point is inside image? | Returns true if the given point is inside the image. Note that if Use absolute coordinates is checked, the Surface object's position will be regarded. |
On callback | Triggered for each pixel that is iterated or blitted using a callback. |
---|
アクション
I/O | |||||
---|---|---|---|---|---|
Load from file | Loads a file into the image of the Surface object. The old image is replaced. The supported formats are: AVI, BMP, GIF, JPEG, PCX, PNG, TGA. The image format is not recognized by the content, merely by the file extension. If the "Override extension" parameter is specified, it is used to recognize the file manually. You may execute events while the image is being loaded - See Threaded file input/output. | ||||
Save to file | Saves the image of the Surface object to a file. The supported formats are: BMP, JPEG, PNG. The image format is not recognized by the content, merely by the file extension. If the "Override extension" parameter is specified, it is used to recognize the file manually. You may execute events while the image is being saved - See Threaded file input/output. | ||||
Load from clipboard | Loads the clipboard into the image of the Surface object. | ||||
Save to clipboard | Saves the image of the Surface object to the clipboard. | ||||
Export as Overlay | Exports the Surface object as Overlay in the memory. This is useful to interact with older extensions that do not support the Surface object. To get the Overlay's address, use Overlay address. When dealing with multiple images, you should re-export the Overlay when the Surface object's image bank is modified. | ||||
Lock buffer | Locks the Surface object's image in BGR format. This is an advanced action and should be needed by average users. It can be modified by third party extensions or applications and then unlocked. To calculate the size in bytes, multiply Buffer pitch by the image's height. To get the memory address of the buffer, use Buffer address. Do not use any functions related to changing the image while the buffer is locked. | ||||
Unlock buffer | Unlocks the image buffer and redraws the image. | ||||
Write bytes | Writes an entity of bytes into the locked buffer, at the specified offset. | ||||
settings | |||||
See Select new images. | See Select new images. | ||||
Set display editing image | See Display editing image. | ||||
Set absolute coords | See Use absolute coordinates. | ||||
Keep points after drawing | See Keep points after drawing. | ||||
Threaded file input/output | See Threaded file input/output. | ||||
Set anti-aliasing | See Anti-aliasing. | ||||
Set transparent | See Transparent. | ||||
Local to image | These settings are local to every image in the bank. They don't affect every image, just the editing image. | ||||
Set clipping rectangle | Sets the clipping rectangle - If a pixel is outside of this rectangle, its color can't get changed by the drawing actions. | ||||
Clear clipping rectangle | Clears the clipping rectangle. | ||||
Fill data | |||||
Color | A single color that is assigned to all pixels. | ||||
Create | Creates a color fill data. There are no advantages over using actual color. | ||||
Set color | Sets the color of the specified fill data. | ||||
Linear gradient | An either horizontal or vertical gradient that spreads over the whole shape. | ||||
Create | Creates a linear gradient fill data. The gradient is either horizontal or vertical and consists of two colors. | ||||
Set colors | Sets the colors of the linear gradient fill data. | ||||
Set vertical | Specifies whether the gradient is horizontal or vertical. | ||||
Radial gradient | A radial gradient that stars in the middle of the fill and ends at the edges. | ||||
Create | Creates a radial gradient fill data. The gradient starts in the middle of the fill. It consists of two colors. | ||||
Set colors | Sets the colors of the radial gradient fill data. | ||||
Tiled image | Fills the shape with a tile (another image in the bank) that is looped as often as needed to cover the area. Optionally, you can set an offset to shift the tile within the shape. | ||||
Create | Created a tiled image fill data with an image in the Surface object's bank as tile. The shape will not be drawn if the image doesn't exist. | ||||
Set tiled image | Sets the tiled image (in the Surface object's bank) to use as tile. | ||||
Set origin | Sets the offset in pixels of the tile. | ||||
Delete | Deletes the fill data with the given name. | ||||
Images | This sub-menu is not available if Use multiple images is unchecked. All its actions are related to managing the images in the Surface object's image bank. | ||||
Set current image | Specifies the image that is currently displayed by the Surface object. | ||||
Set editing image | Specifies the image that is modified by all drawing-related actions. | ||||
Add image | Adds an empty image to the bank. If zero is specified for the width or height, a prototype image is created. This is useful for loading files or resizing it later. | ||||
Insert image | Inserts an empty image before the specified image in the bank. If zero is specified for the width or height, a prototype image is created. This is useful for loading files or resizing it later. | ||||
Copy image | Actions related to copying an image in the object's image bank from an external source. | ||||
From another image | Copies an image from another, completely removing the old data of the target image. | ||||
From Surface object | Copies an image from an image in the image bank of another Surface object. | ||||
From binary surface | Copies an image from a binary surface (Note for developers: cSurface) in the memory. | ||||
Swap two images | Swaps the indexes of two images in the image bank. | ||||
Delete image | Deletes an image from the bank. All images that come after this particular image are given a new index (namely their old one minus one) so that there is not a gap between the images (e.g. 0, 1, 2, 4 when deleting image 3). | ||||
Delete all images | Deletes all images from the bank. | ||||
References | Images references allow you to edit a broad range of images (From other Surface object - and if implemented - other extensions) without having to copy the image's data back and forth. | ||||
Add reference | Adds a reference to an image by specifying its binary address. Referenced images can be selected and edited like all other images, but are not freed by the Surface object.For example, you could edit an image of Surface A in Surface B without actually having to copy it to Surface B's image bank. In this case, if you delete Surface A, and then try to edit its image in Surface B, the application would crash, because the reference has become invalid. | ||||
Insert reference | Inserts a reference to an image by specifying its binary address. Referenced images can be selected and edited like all other images, but are not freed by the Surface object. For example, you could edit an image of Surface A in Surface B without actually having to copy it to Surface B's image bank. In this case, if you delete Surface A, and then try to edit its image in Surface B, the application would crash, because the reference has become invalid. | ||||
Set binary address | Sets the referenced address of an already existing image reference. | ||||
Set reference state | Changes the reference state of an image. This is an advanced feature and can actually crash your application if not used properly. See Add reference. | ||||
Text | This sub-menu does not include any action to actually draw text. To do so, use Draw text. | ||||
Set font face. | Sets the font face to use for drawing text, e.g. "Arial". Note that you should only use common fonts because the end user of your program needs to have the font installed. | ||||
Set font size | The size of the font in points. A good default value is 10. | ||||
Set font weight | The weight of the font. The action takes a value from 0-9, however, in most cases, you don't need such flexibility. 0 for normal font and 7 for bold font should work in most cases. | ||||
Set font decoration | Sets the decoration of the font - Add the possible values (1 for italic, 2 for underline, 4 for strike-out) together to combine them. For example, to get italic underlined font, use 3 (1+2). | ||||
Set font quality | The quality of the font. The possible values are ・ (Don't care) - Let Windows decide which quality to use. ・ (Draft) - The appearance of the font is not so important. ・ (Proof) - The quality of the font is more important than the decoration. ・ (Aliased) - The font is aliased and therefore has sharp borders. ・ (Anti-aliased) - The font might be smoothened by using anti-aliasing, however, not many fonts support this. ・ (ClearType) - The best method for smooth fonts. Uses Microsoft's ClearType technology for readability. | ||||
Set horizontal align | Sets the horizontal alignment of the font (within the area specified when drawing text). | ||||
Set vertical align | Sets the vertical alignment of the font (within the area specified when drawing text). | ||||
Set angel | Sets the angle of the font in degrees (counter-clockwise). This is an experimental feature but might fill your needs. | ||||
Set add ellipsis | See Add ellipsis. | ||||
Set clipping | See No text clipping. | ||||
Set multi-line | See Multi-line. | ||||
Set word break | See Break words. | ||||
Polygons | The actions in this sub-menu allow you to add, remove and modify points that are used to draw a polygon. These points are stored as floating point values internally which allows for more accuracy when stretching or rotating the polygon. Once a polygon has been drawn, the list of points is reset by default. You can change that by checking Keep points after drawing. | ||||
Insert point | Inserts a point before the specified index or at the end if -1 was specified. | ||||
Add points from string | Adds points parsed from the specified string to the end of the list. The format is "X1,Y1,X2,Y2...", however, the allows delimeters are: , ; ( ) x y ...additionally, spaces, tabs and line breaks. | ||||
Add star | Adds a star at (0,0) to the list of points, with the given radiuses and number of spikes. | ||||
Add regular polygon | Adds a regular polygon with the given radius and number of edges at (0,0) to the list of points. | ||||
Move points | Moves all points by a specific amount of pixels. | ||||
Rotate points | Rotates all points around the specified pivot point by a given amount of degrees (counter-clockwise). | ||||
Scale points | Scale all points from the specified center using the given scale factor. | ||||
Remove point | Removes the point at the specified index from the list. | ||||
Remove all points | Removes all points from the list. | ||||
Redraw | |||||
Force | Forces a redraw of the object. This action should only be needed in rare cases. The Surface object should always redraw automatically when it changes. | ||||
Skip | Skips the redraw that was triggered by any action (e.g. set pixel). | ||||
Adjust | These actions allow you to modify the colors of the editing image; they do not transform the image in any way. They are useful when you need to make your image brighter or blur it. | ||||
Convert to grayscale | Converts the image to a black/white version of itself by computing the sum of all three color channels and then calculating the average. | ||||
Invert image | Inverts the image by subtracting each color channel from 255. | ||||
Apply matrix | Applies a 3x3 convolution matrix to the image. The matrix will be iterated as often as specified, which is much faster than repeating the actual action. The algorithm works as follows: First, the original image is preserved. Then, each pixel is given a new color, which is computed like this: The 8 neighbour pixels and the pixel itself are multiplied by their equivalent value in the matrix and then added together. The result is divided by the specified divisor, and then the offset is added. This algorithm allows you to create a broad range of effects. To blur the image, use a divisor of 9, an offset of 0, and a matrix that is completely filled with 1. That way, each of the 9 pixels is added together. Then, the result is divided by 9, since we have 9 pixels. That way, you have the average of the 9 pixels, which results in a blur. In this picture, the blur has been iterated 10 times. Another example effect would be edge detection. This picture uses 0.25 as divisor (to highlight the effect), 0 as offset, is iterated once and uses the following matrix: 0: 1:0 1:-4:1 0: 1:0 The effect subtracts the current pixel (times 4) from the color, but adds the direct neighbors (top, bottom, left, right) to it. That way, high color differences result in high colors. | ||||
Move color channels | Assigns a new value for each color channel, based on the value of another channel (red, green, blue, alpha). For example, if you specify "r" for each channel, you will get a black/white image that displays the red channel of the original image. | ||||
Perform operation | These actions allow you to apply a broad range of operations to the editing image. Here is a complete list of operators supported by the actions. A is the color, B is the specified operand (color or value). Arithmetic operators + (Addition) Returns A+B. - (Subtraction) Returns A-B. * (Multiplication) Returns A*B. / (Division) Returns A/B. ** (Power) Returns AB. % (Modulo) Returns the remainder of A/B. = (Assignment) - Returns B. Comparison operators < (Lower) - Returns A if A<B, otherwise B. > (Greater) - Returns A if A>B, otherwise B. Bitwise operators ・& (AND) - Returns 1 for every bit that exists in A and B. ・| (OR) - Returns 1 for every bit that exists in A or B. ・^ (XOR) - Returns 1 for every bit that exists in A or B but not in both. ・<< (Bitshift left) - Returns A<<B. ・>> (Bitshift right) - Returns A>>B. Expect for *, ** and /, which expect a floating point value of any measure, all operations expect B to be an integral value from 0 to 255. | ||||
With color for RGB | Performs the specified operation with the specified color as operand. In this picture, the operand was "*" and the color was RGB(255,128,0). | ||||
With value for... | Performs the specified operation with a given value for the specified color channels. To specify multiple channels, just string them together, e.g. "rgb". In this picture, the operator was "=", the operand 0, and "r" was used as channel. Therefore, the red channel of the image was set to zero. | ||||
Blit | Blit stands for Block Image Transfer. Basically, that sums up the whole purpose of the blit actions. They allow you to transfer an image, or a part of it, stretched or not, into another. You can either blit from or to the editing image. | ||||
From the surface | These actions do not blit from the editing image itself, but from its alpha channel. | ||||
From the alpha channel | |||||
Image | Blits the editing image onto another image in the bank. | ||||
Alpha channel | Blits the editing image onto another image's alpha channel. This is useful for applying complex operations to an alpha channel, since they actually only support a few drawing commands. | ||||
External | These blit actions interact with external objects or surfaces. | ||||
Background | Blits the editing image onto MMF2's background surface. This surface is used by all objects to display things on-screen. | ||||
Overlay | Blits the editing image onto an Overlay at the given address. | ||||
Surface | Blits the editing image onto the image of another Surface object. | ||||
Add backdrop | Adds a backdrop to the frame. The destination and source region are not regarded. | ||||
Advanced | Advanced blit techniques that you should not need in many cases. | ||||
Binary surface | Blits an arbitrary binary surface in the memory onto the editing image. | ||||
Window handle | Blits the editing image onto the device context of the window at the specified address. If the address is 0, the whole desktop is used. Merely AND, OR and XOR blit modes are supported. None of the flags are, neither is resampling when stretching. | ||||
Onto the surface | These actions blit an image onto the editing image. | ||||
Onto the alpha channel | These actions do not blit onto the editing image itself, but onto its alpha channel. | ||||
Alpha channel | Blits the alpha channel of another image in the bank onto the editing image's alpha channel. | ||||
Image | Blits another image in the bank onto the editing image. | ||||
Alpha channel | Blits another image's alpha channel onto the editing image's alpha channel. This is useful for applying complex operations to an alpha channel, since they actually only support a few drawing commands. | ||||
External | These blit actions interact with external objects or surfaces. | ||||
Active object | These actions allow you to blit the current image of an Active object. Its scale and angle are not regarded. | ||||
Background | Blits from MMF2's background surface. This surface is used by all objects to display things on-screen. | ||||
Overlay | Blits from an Overlay at the given address. | ||||
Surface | Blits from the image of another Surface object. | ||||
Advanced | Advanced blit techniques that you should not need in many cases. | ||||
Binary surface | Blits the editing image onto an arbitrary binary surface in the memory. Yo | ||||
Window hancle | Blits from the device context of the window at the specified address. If the address is 0, the whole desktop is used. Merely AND, OR and XOR blit modes are supported. None of the flags are, neither is resampling when stretching. | ||||
Destination | Specifies how the source image is blitted onto the destination image (where, which size). | ||||
Set position | Sets the top-left coordinate of the destination position. | ||||
Set dimensions | Specifies the new size of the source image that is blitted onto the destination image. Only regarded if the stretch mode is not zero. | ||||
Set stretch mode | 0 (No stretching) - The new size is the old size. 1 (No resampling) - Stretching is done, but without resampling. 2 (Resampling) - Stretching is done with complete resampling. 3 (Opqaue resampling) - Stretching is only done for pixels without transparent neighbors. | ||||
Source | Specifies the region of the source image that is used for blitting. If the region flag is zero, the whole image will be blitted instead. | ||||
Set position | Sets the top-left coordinate of the source region. Only regarded if the region flag is set to one. | ||||
Set dimensions | Sets the size of the source region. Only regarded if the region flag is set to one. | ||||
Set region flag | If set to one, the specified region of the source image is blitted. Otherwise, the whole image is blitted. | ||||
Settings | General blitting settings not related to the position and dimensions. | ||||
Mode | These actions specify how the image is blitted onto another image (e.g. with additive blending). | ||||
Set by index | Specifies the blit mode by its index. 0 - None 1 - Semi-transparency 2 - Invert 3 - Bitwise XOR 4 - Bitwise AND 5 - Bitwise OR 9 - Additive blending 10 - Monochrome 11 - Subtractive blending | ||||
Set by name | Specifies the blit mode by a short name. None Semi-transparency Invert XOR - Bitwise XOR AND - Bitwise AND OR - Bitwise OR Add - Additive blending Mono - Monochrome Sub - Subtractive blending | ||||
Set semi-transparency | Sets the semi-transparency (0-128) used by the Semi-transparency blit mode. | ||||
Transparency | Settings related to how the transparency of the source image is regarded. | ||||
Set transparency flag | Specify whether to regard the source image's transparency when blitting. | ||||
Set copy alpha flag | If set, the alpha channel of the source image is copied into the destination image. | ||||
Set callback | Sets the callback that is used when blitting. Will be ignored when the stretch mode is not zero. They are not much different from ordinary callbacks, but you are not able to use the X position and Y position expressions. However, unlike with normal callbacks, you can use the Destination color expression to get the color of the current pixel in the destination image. |
Callback | Callbacks allow you to loop through an image, triggering the On callback condition for each pixel. By creating an event with this condition, you can get and set each pixel individually, much like using fast loops. Tests have shown that this method is much faster than fast loops - it can be up to three times faster in extreme cases. However, calculating the new pixel color with expression acts as a bottleneck here, which lowers the speed boost. It is also possible to assign a callback to a blit operation using Set callback. | ||||
---|---|---|---|---|---|
Loop through image | Loops through the image with the specified callback. Depending on the flags, this has several purposes. Here is a list of flags that can be combined by adding them together 1 (Get color) - Allows you to use Source color to get the color of the current pixel. 2 (Set color) - Allows you to use Return color to set the color of the current pixel. 4 (Store position) - Allows you to use X position and Y position in the Callback sub-menu to get the position of the current pixel. When you combine 1 and 2, returning a new color is optional. If you don't, the old color will be preserved. | ||||
Loop through area | Same as Loop through image, but limited to the specified area. | ||||
Return color | Returns a color to the current callback. | ||||
Transform | The actions in this sub-menu allow you to stretch, extend or rotate the editing image, or transform the pixels without actually resizing the image, e.g. by reversing it. | ||||
Resize | Resizes the editing image. By default, the nearest neighbor algorithm is used (which is fine for pixel art), however, if you want resampling, read up on the Anti-aliasing property. | ||||
Rotate | Rotates the image by a certain amount of degrees (counter-clockwise). Check the Anti-aliasing property for resampling. The rotation is done via a function in MMF2's library. It might extend your image a bit too much, which can be fixed by using Minimize to cut off transparent borders. | ||||
Resize canvas | Resizes the canvas of the editing image. You can either crop the image to a certain part of the image (if X1 and Y1 are >= 0 and X2 and Y2 < the size), or extend the image by specifying negative values for X1 or Y1 and specifying values greater than the size for X2 or Y2. The extended areas are filled with the transparent color. | ||||
Minimize | Crops the transparent borders around the image. | ||||
Reverse X | Flips the image horizontally. | ||||
Reverse Y | Flips the image vertically. | ||||
Scroll | Offsets the image data inside of the image. Optionally, you can wrap the pixels which means that if a pixel exceeds the right border of the image, it will appear on the left. That way, the whole image data will be preserved and can be restored later. In this picture, the image was offset by (50,20) pixels and wrapping was enabled. | ||||
Transparency | Actions related to the image's transparency. If you want to control whether the Surface object is actually rendered transparently, see Settings > Transparent. | ||||
Set transparent color | Sets the transparent color of the editing image which is used to draw the image on the screen if it does not have an alpha channel. If the second parameter is true, the old color (black by default) will be replaced with the new one to preserve the transparency. | ||||
Alpha channel | Each image can have an alpha channel which defines the transparency of each pixel using a value from 0 to 255. 0 means invisible, and 255 means completely opaque. | ||||
Create | Creates an alpha channel for the editing image. By default, it will be completely black and therefore the image is invisible, but when the second parameter is checked, pixels that are not equal to the transparent color are given an alpha value of 255. | ||||
Remove | Removes the current alpha channel. The transparent color will be used to distinguish between opaque and invisible pixels when drawing, but the actual image is not modified. | ||||
Clear | Clears the alpha channel with a specific value. | ||||
Set pixel | Assigns a new alpha value to a specific pixel. | ||||
Draw line | Draws a line from (X1,Y1) to (X2,Y1) with the specified value. The thickness is always one. | ||||
Draw rectangle | Draws a rectangle from (X1,Y1) to (X2,Y1) with the specified value. You cannot set an outline for the rectangle. | ||||
With color | The actions in this sub-menu all take at least one color as parameter that is somehow used to change the editing image of the Surface object. | ||||
Clear | Clears the editing image with the specified color. | ||||
Set pixel | Assign a specified color to a specified pixel. | ||||
Flood fill | Starting at a given point, all neighbor pixels with the same color of the starting pixel are given the new color. If the tolerance is higher than zero, the RGB values of the pixels might be off by that particular value. | ||||
Replace color | Selects all pixels with the specified color and assigns the new color to them. | ||||
Draw line | Draws a line with the given color and thickness from (X1,Y1) to (X2,Y2). | ||||
Draw rectangle | |||||
Via bounding box | Draws a rectangle with the given color and outline from (X1,Y1) to (X2,Y2). | ||||
Via position and size | Draws a rectangle with the given color and outline starting at (X,Y). | ||||
Draw ellipse | |||||
Via bounding box | Draws an ellipse with the given color and outline from (X1,Y1) to (X2,Y2). | ||||
Via center and size | Draws an ellipse with the given color and outline at the specified position using the specified size. | ||||
Draw polygon | Draws a polygon using the given color and outline at the specified offset. The points used for the polygon can be set in the Polygons sub-menu. | ||||
Draw text | Draws a string of text inside the specified area. It may or may not be clipped to the specified area, depending on whether No text clipping is checked. | ||||
With fil data | The actions in this sub-menu all take at least one fill data parameter that is used to fill the editing image in a specific way. | ||||
Clear | Clears the editing image with the specified fill data. | ||||
Draw line | Draws a line with the given fill data and thickness from (X1,Y1) to (X2,Y2). | ||||
Draw rectangle | |||||
Via bounding box | Draws a rectangle with the given fill data and outline data from (X1,Y1) to (X2,Y2). | ||||
Vid position and size | Draws a rectangle with the given fill data and outline data starting at (X,Y). | ||||
Draw ellipse | |||||
Via bounding box | Draws an ellipse with the given fill data and outline data from (X1,Y1) to (X2,Y2). | ||||
Via center and size | Draws an ellipse with the given fill data and outline data at the specified position using the specified size. | ||||
Draw polygon | Draws a polygon using the given fill data and outline data at the specified offset. The points used for the polygon can be set in the Polygons sub-menu. |
計算式
I/O | |||
---|---|---|---|
Files | Image filters that are used to load/save files. They are part of MMF2 and can be found under "Image Filters" in the settings of an application. By default, all image filters are included in the program, however, you can define which ones to include by unchecking "Automatic" in the dialogue. The following expressions allow you to enumerate all filters included in the program, get their file extensions etc. Here is a complete list of all filters currently supported by MMF2. The bold filters support both reading and writing. ・Autodesk FLIC (*.flc;*.fli) ・Compuserve Bitmap (*.gif) ・JPEG (*.jpg;*.jpeg) ・PaintBrush (*.pcx) ・Targa Bitmap (*.tga) ・Portable Network Graphics (*.png) ・Video For Windows (*.avi) ・Windows Bitmap (*.bmp;*.dib;*.rle) | ||
Overlay address | See Export as Overlay. | ||
Buffer address | See Lock buffer. | ||
Buffer pitch | Returns the width in bytes of a line of pixels of the locked image. See Lock buffer. |
Fill date | |||
---|---|---|---|
Fill date from index | Returns the name of a fill data with the specified index. | ||
Fill data count | Returns the number of fill data (for enumeration purposes). | ||
Color | Returns the color of a color fill data. | ||
Liner gradient | |||
Color A | Returns the first color of a gradient fill data. | ||
Color B | Returns the first color of a gradient fill data. | ||
Radial gradient | |||
Color A | Returns the first color of a gradient fill data. | ||
Color B | Returns the first color of a gradient fill data. | ||
Tiled image | Returns the image index of a tiled image fill data. |
Callback | These expressions should be used inside of an On callback event. | ||
---|---|---|---|
Source color | Returns the color of the current pixel in the image. Works in blit callbacks, too. | ||
Destination color | Returns the color of the current pixel in the destination image. Can only be used in a blit callback. | ||
X position | Returns the X position of the current pixel if 3 is set in the flags. Doesn't work in blit callbacks. | ||
Y position | Returns the Y position of the current pixel if the flags contain 3. Doesn't work in blit callbacks. | ||
Flood fill | |||
Area X1 | Returns the X coordinate of the first pixel that was affected by the last flood fill. | ||
Area Y1 | Returns the Y coordinate of the first pixel that was affected by the last flood fill. | ||
Area X2 | Returns the X coordinate of the last pixel that was affected by the last flood fill. | ||
Area Y2 | Returns the Y coordinate of the last pixel that was affected by the last flood fill. | ||
Toolds | |||
Image count | Returns the number of images in the image bank. | ||
Last added image | Returns the index of the newest image in the bank (added/inserted by an action). | ||
Current image | |||
Index | Returns the index of the currently displayed image. | ||
Width | Returns the width of the currently displayed image. | ||
Height | Returns the height of the currently displayed image. | ||
Image(Editing image) | |||
Index | Returns the index of the editing image. | ||
Width | Returns the width of the editing image. | ||
Height | Returns the height of the editing image. | ||
RGB at | Returns the color index of the specified pixel in the editing image. | ||
Red at | Returns the red value of the specified pixel in the editing image. | ||
Green at | Returns the green value of the specified pixel in the editing image. | ||
Blue at | Returns the blue value of the specified pixel in the editing image. | ||
Alpha at | Returns the alpha value of the specified pixel in the editing image's alpha channel. If there is no alpha channel, the color will be compared against the image's transparent color (and either 0 or 255 will be returned). | ||
Transparent color | Returns the transparent color of the editing image (black by default). | ||
Binary address | Returns the memory address (Note to extension developers: cSurface*) of the editing image. | ||
Any image | |||
Index | Returns the index of the specified image. | ||
Width | Returns the width of the specified image. | ||
Height | Returns the height of the specified image. | ||
RGB at | Returns the color index of the specified pixel in the specified image. | ||
Red at | Returns the red value of the specified pixel in the specified image. | ||
Green at | Returns the green value of the specified pixel in the specified image. | ||
Blue at | Returns the blue value of the specified pixel in the specified image. | ||
Alpha at | Returns the alpha value of the specified pixel in the specified image's alpha channel. If there is no alpha channel, the color will be compared against the image's transparent color (and either 0 or 255 will be returned). | ||
Binary address | Returns the memory address (Note to extension developers: cSurface*) of the specified image. | ||
Properties | The properties that can be found when clicking on the Surface object in the Frame editor. | ||
Settings | Various settings related to the Surface object. | ||
Image Bank | The default image bank of the Surface object. Up to 16 images can be stored at edit-time. | ||
Use multiple images | If checked, actions related to managing the image bank will not be hidden from the menus. You will be able to add new images or set the editing image at runtime. | ||
Load first image on start | If checked, the first image of the bank is displayed at start. If the first image does not exist or is empty, a checkerboard will be drawn in the Frame Editor. You can set its size to define the default canvas that is created at start. Note that when using multiple images, the first image will always be selected as editing image. This option will merely affect the display behaviour. | ||
Select new images | If checked, new images (added/inserted by actions) will be selected as editing image. | ||
Display editing image | There are two types of "current" images in the extension. The actual current image - the one that is currently displayed, and the editing image - the image that is being edited by actions like "Set pixel". If this property is checked, the editing image also is the current image, i.e. it is always displayed. | ||
Use absolute coordinates | The first pixel in the top-left corner of the Surface object is at (0,0). If you set the pixel at (0,0) to red, the top-left corner will therefore be red. However, if this property is checked, the position of the Surface object is subtracted from the given coordinates. For example, if the Surface object is at (100,100) and you set the pixel at (0,0) to red, nothing will happen, because 0-100 is -100, and there is no pixel at (-100,-100). | ||
Keep points after drawing | If checked, the stored polygon points are kept after drawing a polygon and have to be deleted manually. | ||
Threaded file input/output | If checked, the application does not freeze while a file is being loaded or saved which allows you to execute events to indicate the progress. While a "thread" is in progress, you cannot modify the Surface object's image bank at all for security reasons. Plus, when you close the application, you will have to wait until the procress is done. | ||
Display Options | The display options are default properties in many MMF objects. | ||
Transparent | If checked, the Surface object will be drawn transparent (using either the transparent color or the alpha channel). | ||
Anti-aliasing | If checked, resizing and rotating is done with linear resampling. Plus, all drawing functions in the With fill data sub-menu will be drawn with MMF's internal anti-aliasing algorithm. It is not very good and therefore not recommended, but might be helpful anyway. | ||
Text Options | The text options are used to specify the font that is used for drawing text. | ||
Multi-line | If checked, line breaks in the text are not interpreted as spaces. | ||
No text clipping | If checked, the text is not being clipped to a specific area when drawn. Otherwise, drawing the text works in a similar fashion to the String object. You have to specify width and height of the text area, anything that exceeds this area is cut off. | ||
Add ellipsis | If checked, words that do not fit in the area are truncated with ellipses ("..."). | ||
Break words | If checked, line breaks are automatically drawn between words to fit them into the specified area. |