エクステンション解説/Surface Object

Last-modified: 2021-03-02 (火) 01:09:05

Surface Objectとは

Overlay Reduxに似たオブジェクト。文字の描画も可能でClearTypeを掛けることも出来ます。

作成者Looki
バージョン1.5 Beta(2013年05月06日)
対応ランタイムWindows,SWF,HWA

入手方法

以下のリンクからダウンロードして下さい。

使用例

以下のリンクからダウンロードして下さい。
http://castles-of-britain.com/SurfaceObjectExamples.zip

コマンド解説

オブジェクト設定

Image bank

Images
Use multiple imagesUse multiple images.
Actions to manage multiple images will be provided.
Load first image on startLoad first image on start.
Loads and displays image 0 ifavailable on start.
Select new imagesSelect new images.
When an image is added. it is automatically selected as the editing image.
Display editing imageDisplay editing image.
”Set current image" will not be available and the editing image is drawn instead.

Settings

Use absolute coordinatesUse absolute coordinates.
Coordinates are not relative to the surface position.
Keep points after drawingKeep points after drawing.
The polygon points will be kept after drawing one.
Threaded file input/outputThreaded 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 imageReturns the result of the comparison.
Compare to editing imageReturns 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 callbackTriggered for each pixel that is iterated or blitted using a callback.

アクション

I/O
Load from fileLoads 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 fileSaves 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 clipboardLoads the clipboard into the image of the Surface object.
Save to clipboardSaves the image of the Surface object to the clipboard.
Export as OverlayExports 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 bufferLocks 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 bufferUnlocks the image buffer and redraws the image.
Write bytesWrites an entity of bytes into the locked buffer, at the specified offset.
settings
See Select new images.See Select new images.
Set display editing imageSee Display editing image.
Set absolute coordsSee Use absolute coordinates.
Keep points after drawingSee Keep points after drawing.
Threaded file input/outputSee Threaded file input/output.
Set anti-aliasingSee Anti-aliasing.
Set transparentSee Transparent.
Local to imageThese settings are local to every image in the bank. They don't affect every image, just the editing image.
Set clipping rectangleSets the clipping rectangle - If a pixel is outside of this rectangle, its color can't get changed by the drawing actions.
Clear clipping rectangleClears the clipping rectangle.
Fill data
ColorA single color that is assigned to all pixels.
CreateCreates a color fill data. There are no advantages over using actual color.
Set colorSets the color of the specified fill data.
Linear gradientAn either horizontal or vertical gradient that spreads over the whole shape.
CreateCreates a linear gradient fill data. The gradient is either horizontal or vertical and consists of two colors.
Set colorsSets the colors of the linear gradient fill data.
Set verticalSpecifies whether the gradient is horizontal or vertical.
Radial gradientA radial gradient that stars in the middle of the fill and ends at the edges.
CreateCreates a radial gradient fill data. The gradient starts in the middle of the fill. It consists of two colors.
Set colorsSets the colors of the radial gradient fill data.
Tiled imageFills 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.
CreateCreated 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 imageSets the tiled image (in the Surface object's bank) to use as tile.
Set originSets the offset in pixels of the tile.
DeleteDeletes the fill data with the given name.
ImagesThis 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 imageSpecifies the image that is currently displayed by the Surface object.
Set editing imageSpecifies the image that is modified by all drawing-related actions.
Add imageAdds 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 imageInserts 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 imageActions related to copying an image in the object's image bank from an external source.
From another imageCopies an image from another, completely removing the old data of the target image.
From Surface objectCopies an image from an image in the image bank of another Surface object.
From binary surfaceCopies an image from a binary surface (Note for developers: cSurface) in the memory.
Swap two imagesSwaps the indexes of two images in the image bank.
Delete imageDeletes 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 imagesDeletes all images from the bank.
ReferencesImages 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 referenceAdds 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 referenceInserts 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 addressSets the referenced address of an already existing image reference.
Set reference stateChanges the reference state of an image. This is an advanced feature and can actually crash your application if not used properly.
See Add reference.
TextThis 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 sizeThe size of the font in points. A good default value is 10.
Set font weightThe 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 decorationSets 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 qualityThe 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 alignSets the horizontal alignment of the font (within the area specified when drawing text).
Set vertical alignSets the vertical alignment of the font (within the area specified when drawing text).
Set angelSets the angle of the font in degrees (counter-clockwise). This is an experimental feature but might fill your needs.
Set add ellipsisSee Add ellipsis.
Set clippingSee No text clipping.
Set multi-lineSee Multi-line.
Set word breakSee Break words.
PolygonsThe 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 pointInserts a point before the specified index or at the end if -1 was specified.
Add points from stringAdds 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 starAdds a star at (0,0) to the list of points, with the given radiuses and number of spikes.
Add regular polygonAdds a regular polygon with the given radius and number of edges at (0,0) to the list of points.
Move pointsMoves all points by a specific amount of pixels.
Rotate pointsRotates all points around the specified pivot point by a given amount of degrees (counter-clockwise).
Scale pointsScale all points from the specified center using the given scale factor.
Remove pointRemoves the point at the specified index from the list.
Remove all pointsRemoves all points from the list.
Redraw
ForceForces a redraw of the object. This action should only be needed in rare cases. The Surface object should always redraw automatically when it changes.
SkipSkips the redraw that was triggered by any action (e.g. set pixel).
AdjustThese 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 grayscaleConverts the image to a black/white version of itself by computing the sum of all three color channels and then calculating the average.
Invert imageInverts the image by subtracting each color channel from 255.
Apply matrixApplies 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 channelsAssigns 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 operationThese 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 RGBPerforms 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.
BlitBlit 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 surfaceThese actions do not blit from the editing image itself, but from its alpha channel.
From the alpha channel
ImageBlits the editing image onto another image in the bank.
Alpha channelBlits 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.
ExternalThese blit actions interact with external objects or surfaces.
BackgroundBlits the editing image onto MMF2's background surface. This surface is used by all objects to display things on-screen.
OverlayBlits the editing image onto an Overlay at the given address.
SurfaceBlits the editing image onto the image of another Surface object.
Add backdropAdds a backdrop to the frame.
The destination and source region are not regarded.
AdvancedAdvanced blit techniques that you should not need in many cases.
Binary surfaceBlits an arbitrary binary surface in the memory onto the editing image.
Window handleBlits 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 surfaceThese actions blit an image onto the editing image.
Onto the alpha channelThese actions do not blit onto the editing image itself, but onto its alpha channel.
Alpha channelBlits the alpha channel of another image in the bank onto the editing image's alpha channel.
ImageBlits another image in the bank onto the editing image.
Alpha channelBlits 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.
ExternalThese blit actions interact with external objects or surfaces.
Active objectThese actions allow you to blit the current image of an Active object. Its scale and angle are not regarded.
BackgroundBlits from MMF2's background surface. This surface is used by all objects to display things on-screen.
OverlayBlits from an Overlay at the given address.
SurfaceBlits from the image of another Surface object.
AdvancedAdvanced blit techniques that you should not need in many cases.
Binary surfaceBlits the editing image onto an arbitrary binary surface in the memory. Yo
Window hancleBlits 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.
DestinationSpecifies how the source image is blitted onto the destination image (where, which size).
Set positionSets the top-left coordinate of the destination position.
Set dimensionsSpecifies 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 mode0 (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.
SourceSpecifies 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 positionSets the top-left coordinate of the source region. Only regarded if the region flag is set to one.
Set dimensionsSets the size of the source region. Only regarded if the region flag is set to one.
Set region flagIf set to one, the specified region of the source image is blitted.
Otherwise, the whole image is blitted.
SettingsGeneral blitting settings not related to the position and dimensions.
ModeThese actions specify how the image is blitted onto another image (e.g. with additive blending).
Set by indexSpecifies 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 nameSpecifies 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-transparencySets the semi-transparency (0-128) used by the Semi-transparency blit mode.
TransparencySettings related to how the transparency of the source image is regarded.
Set transparency flagSpecify whether to regard the source image's transparency when blitting.
Set copy alpha flagIf set, the alpha channel of the source image is copied into the destination image.
Set callbackSets 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.
CallbackCallbacks 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 imageLoops 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 areaSame as Loop through image, but limited to the specified area.
Return colorReturns a color to the current callback.
TransformThe 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.
ResizeResizes 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.
RotateRotates 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 canvasResizes 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.
MinimizeCrops the transparent borders around the image.
Reverse XFlips the image horizontally.
Reverse YFlips the image vertically.
ScrollOffsets 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.
TransparencyActions related to the image's transparency.
If you want to control whether the Surface object is actually rendered transparently, see Settings > Transparent.
Set transparent colorSets 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 channelEach 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.
CreateCreates 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.
RemoveRemoves 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.
ClearClears the alpha channel with a specific value.
Set pixelAssigns a new alpha value to a specific pixel.
Draw lineDraws a line from (X1,Y1) to (X2,Y1) with the specified value. The thickness is always one.
Draw rectangleDraws a rectangle from (X1,Y1) to (X2,Y1) with the specified value. You cannot set an outline for the rectangle.
With colorThe 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.
ClearClears the editing image with the specified color.
Set pixelAssign a specified color to a specified pixel.
Flood fillStarting 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 colorSelects all pixels with the specified color and assigns the new color to them.
Draw lineDraws a line with the given color and thickness from (X1,Y1) to (X2,Y2).
Draw rectangle
Via bounding boxDraws a rectangle with the given color and outline from (X1,Y1) to (X2,Y2).
Via position and sizeDraws a rectangle with the given color and outline starting at (X,Y).
Draw ellipse
Via bounding boxDraws an ellipse with the given color and outline from (X1,Y1) to (X2,Y2).
Via center and sizeDraws an ellipse with the given color and outline at the specified position using the specified size.
Draw polygonDraws 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 textDraws 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 dataThe 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.
ClearClears the editing image with the specified fill data.
Draw lineDraws a line with the given fill data and thickness from (X1,Y1) to (X2,Y2).
Draw rectangle
Via bounding boxDraws a rectangle with the given fill data and outline data from (X1,Y1) to (X2,Y2).
Vid position and sizeDraws a rectangle with the given fill data and outline data starting at (X,Y).
Draw ellipse
Via bounding boxDraws an ellipse with the given fill data and outline data from (X1,Y1) to (X2,Y2).
Via center and sizeDraws an ellipse with the given fill data and outline data at the specified position using the specified size.
Draw polygonDraws 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
FilesImage 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 addressSee Export as Overlay.
Buffer addressSee Lock buffer.
Buffer pitchReturns the width in bytes of a line of pixels of the locked image.
See Lock buffer.
Fill date
Fill date from indexReturns the name of a fill data with the specified index.
Fill data countReturns the number of fill data (for enumeration purposes).
ColorReturns the color of a color fill data.
Liner gradient
Color AReturns the first color of a gradient fill data.
Color BReturns the first color of a gradient fill data.
Radial gradient
Color AReturns the first color of a gradient fill data.
Color BReturns the first color of a gradient fill data.
Tiled imageReturns the image index of a tiled image fill data.
CallbackThese expressions should be used inside of an On callback event.
Source colorReturns the color of the current pixel in the image. Works in blit callbacks, too.
Destination colorReturns the color of the current pixel in the destination image. Can only be used in a blit callback.
X positionReturns the X position of the current pixel if 3 is set in the flags. Doesn't work in blit callbacks.
Y positionReturns the Y position of the current pixel if the flags contain 3. Doesn't work in blit callbacks.
Flood fill
Area X1Returns the X coordinate of the first pixel that was affected by the last flood fill.
Area Y1Returns the Y coordinate of the first pixel that was affected by the last flood fill.
Area X2Returns the X coordinate of the last pixel that was affected by the last flood fill.
Area Y2Returns the Y coordinate of the last pixel that was affected by the last flood fill.
Toolds
Image countReturns the number of images in the image bank.
Last added imageReturns the index of the newest image in the bank (added/inserted by an action).
Current image
IndexReturns the index of the currently displayed image.
WidthReturns the width of the currently displayed image.
HeightReturns the height of the currently displayed image.
Image(Editing image)
IndexReturns the index of the editing image.
WidthReturns the width of the editing image.
HeightReturns the height of the editing image.
RGB atReturns the color index of the specified pixel in the editing image.
Red atReturns the red value of the specified pixel in the editing image.
Green atReturns the green value of the specified pixel in the editing image.
Blue atReturns the blue value of the specified pixel in the editing image.
Alpha atReturns 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 colorReturns the transparent color of the editing image (black by default).
Binary addressReturns the memory address (Note to extension developers: cSurface*) of the editing image.
Any image
IndexReturns the index of the specified image.
WidthReturns the width of the specified image.
HeightReturns the height of the specified image.
RGB atReturns the color index of the specified pixel in the specified image.
Red atReturns the red value of the specified pixel in the specified image.
Green atReturns the green value of the specified pixel in the specified image.
Blue atReturns the blue value of the specified pixel in the specified image.
Alpha atReturns 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 addressReturns the memory address (Note to extension developers: cSurface*) of the specified image.
PropertiesThe properties that can be found when clicking on the Surface object in the Frame editor.
SettingsVarious settings related to the Surface object.
Image BankThe default image bank of the Surface object. Up to 16 images can be stored at edit-time.
Use multiple imagesIf 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 startIf 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 imagesIf checked, new images (added/inserted by actions) will be selected as editing image.
Display editing imageThere 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 coordinatesThe 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 drawingIf checked, the stored polygon points are kept after drawing a polygon and have to be deleted manually.
Threaded file input/outputIf 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 OptionsThe display options are default properties in many MMF objects.
TransparentIf checked, the Surface object will be drawn transparent (using either the transparent color or the alpha channel).
Anti-aliasingIf 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 OptionsThe text options are used to specify the font that is used for drawing text.
Multi-lineIf checked, line breaks in the text are not interpreted as spaces.
No text clippingIf 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 ellipsisIf checked, words that do not fit in the area are truncated with ellipses ("...").
Break wordsIf checked, line breaks are automatically drawn between words to fit them into the specified area.

コメント

  • コマンド解説のリストを作成 -- toya? 2013-01-31 (木) 22:54:10
  • 入手先がリンク切れしていたので修正 -- toya? 2013-01-31 (木) 23:08:42
  • 使用例のサンプルファイルのリンクが切れていたので修正 -- nana? 2019-01-09 (水) 10:18:17