The UF Programmer includes a set of graphics functions that give you the ability to create a graphics display of any size, and to create algorithmic graphics visuals in sync with your MIDI music. You can create graphics "modules" from UF Modules that can be controled by other SoftStep modules (see the example program ufgraphics.ssp for an example of this). Or you can create graphics functions that run more or less on their own, almostly completely set up and programmed through the UF Programmer.
Start the graphics display with PixON, and turn the display off with PixOFF. You can just type this into the UF Programmer Eval line, and click on the Test Fnbutton to see the graphics window pop up. When showing, you can click and drag on the display to move it around the screen. You can also double click on it to switch it from Always On Top, to normal display.
A word of caution: Graphics operations can take a great deal of processing time. While simple drawing functions are not likely to cause problems, it is fairly easy to overload the processor painting large areas. If you use graphics extensively you may need to employ MIDI Latency (see Options). Keep in mind that SoftStep does not just play back the graphics and sound as a multimedia player, it creates them in real time algorithmically. You will have to experiment to get a good balance between interesting visuals and glitch free MIDI output.
PixMaxFrame - Highest frame currently initialized
PixNumFrames(N) - set number of picture frames to use. Lower limit of N is 1, no upper limit but each frame costs memory resources, so no more frames that needed should be set. If N is less than current number of frames any frames above N are deleted. If N is greater than the current number of frames new frames are added but existing frames are not changed.
For example, you can add one more frame with:
PixNumFrames(PixMaxFrame + 1)
PixActive(N) - set picture frame N to be the active frame for subsequent image drawing functions. Only one frame is active at a time, although any number may be visible.
When using only a single picture frame, the above two functions may be ingored because the default Pix reset function (on startup, when loading a new .ufn file, etc.) is to create a single frame, and make that frame #1the active one.
PixOn - Initialize and display image frame. Image has no window border, but can be moved with click and drag.
PixOff - Hide the image; PixOn shows it again, etc.
PixShow(n) - Show (n=1) or hide (n=0) image without reinitializing it. Drawing and image loading functions can be done while image is hidden.
PixAutoRepaint(n) - Sets frame to automatically repaint upon drawing (n=1, the default), or to not repaint (n=0) until either turned back on, or a PixRepaint command is given. This is useful for animations, where the old animation frame is restored to background, then the new animation frame is painted. Repainting only at the end of the cycle eliminates the flicker caused by overwriting the old part, that is briefly seen before the new part displays. This effectively gives classical double buffering, but at a fraction of the cost in CPU cycles.
PixRepaint - Forces a repaint of the image frame. Used when PixAutoRepaint (above) has been turned off to eliminate flickering in animations.
PixOnTop(n) - If n is non zero then image window is always on top; if n = 0 then image window is normal (default). Also, you can just double click on the display to switch between On Top and normal. Caution: when you set an image window to be on top, it will cover any other Windows pop up dialogs, such as file save dialogs. In most cases, you should set On Top to migrate the window to topmost visibility, then turn it off again in order to not intefere with other Windows activity.
PixFill(color) - Fills image with color. All colors are integers that represent RGB. You can use the RGB() function to get the right color setting. For example PixFill(RGB(255,128,0)) floods with orange.
PixSize(width, height) - changes image to given size. The image window is never greater than overall Windows screen size. All screen values for all image functions are in pixels.
If only Width is given and the value is 0-5 then the image sizes are: 0= 128x128, 1= 160x120, 2= 320x240, 3= 640x480, 4= 800x600, 5= 1024x768.
If only Width is given, and size is the X part of a standard image size: 128= 128x128, 160= 160x120, 320= 320x240, 640= 640x480, 800= 800x600, 1024= 1024x768. If Width is not one of the specified X values, no action is taken.
When you resize the image, the scale multipliers, PSX & PSY are automatically updated. PSX is Width/127, and PSY is Height/127. They allow you to translate the 0-127 standard module input range into proportional screen dimensions. See see example program ufgraphics.ssp for an example of this.
PixMove(x,y) - move image to new location. X,Y are upper left corner. You can also just click and drag to manually move the display.
PixLoad(N, ["filename"], ["directory"], ["format"], [resize]) - loads an image file. Returns 1 if error, 0 if ok. Filename and directory are optional string arguments (must be in quotes). If directory is omitted, it defaults to "c:\graphics", if given an empty string (""), it uses the current .ssp file directory; if filename is not given, it defaults to "Pix". Format must be in quotes and may be "bmp," "gif," "jpg," or "png." If omitted, defaults to "bmp." N is required and is a number that is appended to the file name; if N is negative then no number is appended. Resize determins how the image frame is resized, and it takes the same parameters as PixFrame(), below. If omitted, the image is not resized.
PixLoad(1) = c:\graphics\Pix001.bmp
PixLoad(1234,"bigpix") = c:\graphics\BIGPIX1234.BMP
PixLoad(12, "bigpix", "d:\pix\softstep") = D:\PIX\SOFTSTEP\BIGPIX012.BMP
PixLoad(-1, "bigpix", "d:\pix\softstep") = D:\PIX\SOFTSTEP\BIGPIX.BMP
PixLoad(-1, "bigpix", "d:\pix\softstep", "jpg") = D:\PIX\SOFTSTEP\BIGPIX.JPG
Note that you can define string variables in the global variable area, but you can not use Let() or N.() to define strings. To define a string variable, simply put the string in quotes into the value box.
PixSave(N, ["filename"], ["directory\"], ["format"]) - saves the image as above except only format types "bmp" and "png" are supported for saving.
PixFrame(N) - Resizes image to frame or frame to image. If N = 1 (any >= 1) then the frame is resized to the image. If n = 0 then the image is resized to the frame; and if N = -1 (any < 0) then the images is resized to the frame with a slower but higher quality resampling algorithm. This function should be called after loading an image.
PixPalMake("palette", "c:\graphics", Page, BoxSize) - stores colors in Page(0-9) of palette array by reading a matrix of color squares from a palette file. The file name string is for a .bmp file only. Squares are read left to right, top to bottom. BoxSize is the size in pixels of the palette color boxes. All parameters are optional: the file name defaults to "palette"; the directory defaults to "c:\graphics"; Page defaults to0; BoxSize default to 12.
PixPalShowl(Page) - displays in current image frame the colors in Page(0-9) of the palette array, does nothing if the palette array has not been created..
PixPalStore(Color, Index, Page, [x, y]) - Stores RGB Color to Page(0-9), Index. If x (columns) and y (rows) are given, creates a new palette array.
PixPalFetch(Index, Page) - Returns RGB palette color stored at Page(0-9), Index. Index range depends on number of colors stored, 0 based. Returns 0 if the palette array has not been created.
PixCreateGuide("guide", "c:\graphics") - draw with mouse on current frame; when mouse button released, stores X,Y points in given file .bin file. This function allows you to draw freehand on an image, saving the x,y points to be used later for an animation guide. When you call the function, the current image pops up. Placing the mouse cursor over the image will give a pointing hand mouse cursor, to show it is ready to receive the guide points. Press the left mouse button and draw your guide, when you release the mouse button, the array of points is stored to disk (in the above example, the file would be stored in "c:\graphics\guide.bin"), and the frame returns to normal. To return the frame to normal without creating a guide, use the PixFreeze() function.
PixLoadGuide("guide", "c:\graphics", Page) - loads a previously created guide file to Page (0-127) returns number of points in the guide array.
PixShowGuide(Page) - draws guide in Page (0-127) on current frame in XOR color (repeat to erase).
PixGuideX(Index, Page) - Returns guide point X at Index, Page (0-127); returns -1 if Index is out of bounds.
PixGuideY(Index, Page) - Returns guide point Y at Index, Page (0-127); returns -1 if Index is out of bounds.
RGB ( Red, Green, Blue) returns the 24 bit color integer from the RGB components. RGB is each 0-255.
pRed(Color) - returns the red part of a 24 bit RGB color integer.
pGreend(Color) - returns the green part of a 24 bit RGB color integer.
pBlue(Color) - returns the blue part of a 24 bit RGB color integer.
PixFrameWidth - returns the width of the current image frame in pixels.
PixFrameHeight - returns the height of the current image frame in pixels.
PixScreenWidth - returns the width of the monitor screen in pixels.
PixScreenHeight - returns the height of the monitor screen in pixels.
PixToolTip("Any Text") - sets the tool tip for the current frame. Default is no text, so PixToolTip() will remove the default frame tool tip of "Frame:N."
PixFreeze(N) - sets whether a frame can be moved by click and drag with the mouse, or is "frozen" so mouse activity on the frame can be read with the PixMouse() fuction. N=0 (default), mouse moves frame; N=1 reports mouse activity.
PixMouse(Frame, Which) - 0=Flag, 1=Btn, 2=Shift, 3=X, 4=Y, 5=PicX, 6-PicY
PixMouse(Frame, Which) - reads mouse position and flag when mouse button is clicked in the image frame, and PixFreeze() has been set to 1.
Frame identifies the image frame to read from. PixMouse() can read from any frame that has been set to PixFreeze(1); it is not limited to just the current frame.
Which sets the mouse parameter to return:
0=mouse clicked flag (1 if any mouse button is pressed, 0 if no mouse button is pressed),
1=mouse button value (normally this will be 1 for left button, 2 for right button and 3 for both buttons),
2=shift value, when a keybard shift key is pressed while the mouse button is down (1=Shift key, 2=Ctrl key, 4=Alt key),
3=the mouse X value relative to the point in the frame where the mouse button was first pressed, with 0 at the click point, negative numbers to the left of the point, and positive numbers at the right of the point,
4= the mouse Y position relative to the click point, with negative numbers above the click point, positive numbers below.
5= the absolute mouse X position in the frame, in pixels, starting from the left=0.
6= the absolute mouse Y position in the frame, starting from the to0.
PixDrawMode(DrawMode) - sets the draw mode. See below for PixDrawMode values.
PixPenStyle(PenStyle) - sets the draw style. See below for PixPenStyle values.
PixPenWidth(size) - sets pen width.
PixPenColor(color) - sets pen draw color. Same color format as PixFill above.
PixFillColor(color) - sets the fill color for enclosed objects.
PixFillStyle(style) - sets the fill style. See below for PixFillStyle values.
PixDot(x,y,[sym]) - draw a dot at x,y with current PenColor.
Note: Sym is optional on all drawing routines. If used it draws in 2-8 symmetry. Values for Sym are 0/1 (no symmetry), 2, 4, and 8.
PixRDot(x,y) - reads dot at x,y.
PixLine(x1,y1,x2,y2, [sym]) - draw line with current mode, etc.
PixEllipse(left, top, width, height, [sym]) - draw an ellipse.
PixRect(left, top, width, height, [sym]) - draw a rectangle.
PixText([X], [Y], ["Text"]) - draws text with upper left of first character at location x,y. All parameters are optional and if not given defaults to last parameter used. Text string must be in quotes if given directly, or a preset text variable may be used. Variables have the advantage that lower case characters are not changed to upper case.
PixFont(["Fontname"], [size], [bold], [italic], [underline], [strikethrough]) - Sets font properties for subsiquent text drawing. All items are optional, if omitted they default to the last set value. Fontname must be in quotes and can be any font installed inWindows. Size is in picas; defaults to 8 if never used. Bold, italic, underline, and strikethrough are 1 to enable and 0 to disable; default to 0 if never used.
Example: Font("Times" , 12, , 1) - sets font to 12 pica Times Roman Italic.
PixFontColor(color) - sets font draw color. Same color format as PixFill above.
PixShadow(x-depth, y-depth, color) - shadow for shape. Set depth to 0 for no shadow (default).
PixShapeSet(BorderStyle, BackStyle, width, color) - basic setup for shape. See Border & Back Style values below.
PixShapeBand(BandStyle, width, HiliteColor, ShadowColor) - sets the outline properties. See below for Band Style values.
PixPatternSet(PixFillStyle, FgnColor, BkgColor) - Set the draw style and color of Shape body.See below for PixFillStyle values.
PixShape(left, top, width, height, Shape, [sym]) - finally, after all that setup, you get to do it. Big list of Shape Values below.
PixCopy(src) - copy picture source frame to active frame. Active frame is resized to fit the source frame.
PixCombine(src, flags, Left, Top, Width, Height, srcLeft, srcTop) - Merge a source frame into the active frame. All parameters except src (source frame) are optional. Default values are 0 for Left, Top, srcLeft, and srcTop; Width and Height defaults to the source frame width and height; flags defaults to simple copy.
Flags are the additive combination of 4 combine flag (see table of Frame Combine Flags below). One flag from each set of Source, Destination, Operation, and Result tables may be combined to produce a large variation of combine effects.
Example combine flag values:
800 = Simple copy (default) = 32 (CB_DST_0) + 768 (CB_OP_ADD)
512 = XOR frames = 512 (CB_OP_XOR)
529 = XOR, both frames inverted = 1 (CB_SRC_NOT) + 16 (CB_DST_NOT) + 512 (CB_OP_XOR)
PixUnderlay(src, flag) - combines active frame with src frame so that the src frame appears to be an underlying texture. Changes the colors of the underlay to grayscale as it combines the images. Flag is optional and sets whether the underlying image is stretched (flag=0, default) or tiled to fill the target image (flag=1).
PixProtect(flag, color) - Sets a color-defined region of protection for PixCombine and for many drawing and filtering functions ( listed below). Once the protect region is defined, it remains until changed regardless of color changes; in other words the color defines the region but the region does not track the color. Both parameters are optional and default to 0.
Flag values are:
0 = the color area is protected
1 = the color area is not protected but everything else is
-1 = remove all protection and release memory used by the protection mask
The following functions are affected by PixProtect: PixCombine, PixClobber, PixFill, PixFilter, PixEmboss, PixMosaic, PixPosterize, PixSharpen, PixSoften, PixIntensity, PixContrast.
Flip(n) - Flip image frame up/down if n=1, Left/right if n=2, and both if n=3
PixRotate(Angle, Color, Resize, Interpolation) - Rotate the frame by given Angle. All parameters optional.
Angle range is +/- 1 to 360 (default = 45). Positive Angle values rotate clockwise, negative counterclockwise. Fractional values (e.g. 21.43) allowed.
Resize=1 will resize the image to accommodate the rotated height and width; Resize=0 (default) retains the original height and width, cropping the image as necessary.
Interpolation sets whether to interpolate the resulting image. 0 (default) = none, 1= bilinear interpolation, 2 = bicubic (smoother but slower to process).
PixShear(Angle, Color, Horiz) - Moves the corners of the bitmap in the fashion of a parallelogram. All parameters optional.
Angle range is +/- 1 to 45 (default = 15). Positive Angle values shear clockwise, negative counterclockwise. Fractional values (e.g. 21.43) allowed.
Color is the fill color for the sheared empty space (default=0).
Horiz = 1 causes a horizontal shear, 0 (default) causes a vertical shear.
PixClobber(Low, High) - Detects colors in a specified intensity range given by optional parameters Low (0-255, default=128) and High (0-255, default=255). Processes each R, G, B color plane separately. If a value falls within the range, it is raised to 255, and if it falls outside the range, it is lowered to 0. Useful for combining colors to effectively give PixProtect a multi color range.
PixEmboss(Direction, Depth) - Applies an emboss effect to the image. Direction range is 0 to 7 (default = 1), with 0=North, 1=NE, 3=East, etc., and is the same as the first 8 Filter Type parameters, listed below. Depth range 0 to 1000 (default=500).
PixMosaic(tilesize) - Imposes a mosaic effect on the image by dividing it into tiles of a specified size and changing the color of all pixels in each tile to the average color of pixels within the tile. Tilesize (2-256) is optional and defaults to 8.
PixOilify(tilesize) - Applies an oil-painting effect to the image. Control the effect by specifying the size of the neighborhood that is used for calculating the pixel value. Larger tilesize values results in less detail. Tilesize (2-256) is optional and defaults to 8.
PixPosterize(levels) - Imposes a poster effect on the bitmap by quantizing the image's colors to a specified number of color levels per plane. For example, two levels means two of red, two of green, and two of blue. Levels parameter (2-64) is optional and defaults to 8.
PixSolarize(threshold) - Applies an effect that mimics the accidental exposure of photographic film to light. It does so by inverting all color data with an intensity value greater than or equal to the threshold parameter. Threshold (0-255) is optional and defaults to 96).
PixSharpen(sharpness) - Increases or decreases the sharpness of the image in the bitmap. Sharpness parameter (-1000 to +1000) is optional and defaults to 500. Positive values increase sharpness, negative values decrease.
PixSoften(tilesize) - Changes the color of each pixel in the image to the average color of pixels in its neighborhood, resulting in a blur effect. Tilesize (2-256) is optional and defaults to 8.
PixGamma(value) - Adjusts the intensity of colors in the image by changing the gamma constant that is used to map the intensity values. Intensity values ideally follow a logarithmic progression, because the eye perceives changes in intensity as being equal when the ratio of change is equal. For example, we would see a change from 0.1 to 0.2 as being equal to a change from 0.2 to 0.4. Gamma is a standard constant value that is used to calculate the progression. For most CRTs the gamma value is in the range of 2.2 to 2.5. Value (0-20) is optional and defaults to 2.0.
PixIntensity(value) - Changes the intensity (brightness) of the image. Brightness parameter value (-1000 to +1000) is optional and defaults to 200. Positive values increase brightness, negative values decrease.
PixContrast(value) - Changes the contrast of the image. Contrast parameter value (-1000 to +1000) is optional and defaults to 200. Positive values increase contrast, negative values decrease.
PixFilter(type) - Imposes a spatial filter on the bitmap. Spatial filters are used for operations such as sharpening an image or detecting edges within the image. Filter type parameter (0-32) is optional and defaults to 17, FLT_LAPLACE_2. See below for table of Filter Types.
1 = BLACKNESS Pixel is always black. 2 = NOT_MERGE PEN Pixel is the inverse of the MERGE_PEN color. 3 = MASK_NOT_PEN Pixel is a combination of the colors common to both the target and the inverse of the pen. 4 = NOT_COPY_PEN Pixel is the inverse of the pen color. 5 = MASK_PEN_NOT Pixel is a combination of the colors common to both the pen and the inverse of the target. 6 = INVERT Pixel is the inverse of the target color. 7 = XOR_PEN Pixel is a combination of the colors in the pen and in the target, but not in both. 8 = NOT_MASK_PEN Pixel is the inverse of the MASK_PEN color. 9 = MASK_PEN Pixel is a combination of the colors common to both the pen and the target. 10 = NOT_XOR_PEN Pixel is the inverse of the XOR_PEN color. 11 = NOP Pixel remains unchanged. 12 = MERGE_NOT_PEN Pixel is a combination of the target color and the inverse of the pen color. 13 = COPY_PEN Pixel is the pen color. 14 = MERGE_PEN_NOT Pixel is a combination of the pen color and the inverse of the target color. 15 = MERGE_PEN Pixel is a combination of the pen color and the target color. 16 = WHITENESS Pixel is always white.
0 = SOLID Lines are solid. 1 = DASH Lines are dashed. This style is valid only when the DrawPenWidth property is 1. 2 = DOT Lines are dotted. This style is valid only when the DrawPenWidth property is 1. 3 = DASH_DOT Lines alternate dashes and dots. This style is valid only when the DrawPenWidth property is 1. 4 = DASH_DOT_DOT Lines alternate dashes and double dots. This style is valid only when the DrawPenWidth property is 1. 5 = TRANSPARENT Lines are invisible. 6 = INSIDE_SOLID Lines are solid, and are inside the bounds of the object.
0 = SOLID Solid color 1 = TRANSPARENT Transparent 2 = HORIZONTAL_LINE Horizontal lines 3 = VERTICAL_LINE Vertical lines 4 = UPWARD_DIAGONAL Upward diagonal lines 5 = DOWNWARD_DIAGONAL Downward diagonal lines 6 = CROSS Straight cross-hatch 7 = DIAGONAL_CROSS Diagonal cross-hatch
Shape Border Style Values:
0 = TRANSPARENT Transparent 1 = SOLID Solid line 2 = DASH Dash line (valid only for 1-pixel lines) 3 = DOT Dot line (valid only for 1-pixel lines) 4 = DASHDOT Dash dot line (valid only for 1-pixel lines) 5 = DASHDOTDOT Dash dot dot line (valid only for 1-pixel lines)
Shape Back Style Values:
0 = TRANSPARENT Transparent 1 = OPAQUE Opaque 2 = TRANSLUCENT Translucent 3 = TILED_IMAGE Tiled image 4 = TRANSLUCENT_TILED_IMAGE Translucent tiled image 5 = GRADIENT Gradient color
Shape Band Style Values:
0 = OUTERSTYLE_NONE No outer band 1 = OUTERSTYLE_INSET Outer band inset 2 = OUTERSTYLE_RAISED Outer band raised
Rectangle class 2000 = RECTANGLE Rectangle 2001 = RECTANGLE_ROUNDED Rounded rectangle Square class 1000 = SQUARE Square 1001 = SQUARE_ROUNDED Rounded square Parallelogram class 3000 = PARALLELOGRAM_L Parallelogram left 3001 = PARALLELOGRAM_R Parallelogram right 3002 = PARALLELOGRAM_T Parallelogram top 3003 = PARALLELOGRAM_B Parallelogram bottom Trapezoid class 4000 = TRAPEZOID_L Trapezoid left 4001 = TRAPEZOID_R Trapezoid right 4002 = TRAPEZOID_T Trapezoid top 4003 = TRAPEZOID_B Trapezoid bottom Circle class 7000 = CIRCLE Circle 7001 = CIRCLE_90_LT Circle 90° left-top 7002 = CIRCLE_90_LB Circle 90° left-bottom 7003 = CIRCLE_90_RT Circle 90° right-top 7004 = CIRCLE_90_RB Circle 90° right-bottom 7005 = CIRCLE_180_L Circle 180° left 7006 = CIRCLE_180_R Circle 180° right 7007 = CIRCLE_180_T Circle 180° top 7008 = CIRCLE_180_B Circle 180° bottom 7009 = CIRCLE_270_LT Circle 270° left-top 7010 = CIRCLE_270_LB Circle 270° left-bottom 7011 = CIRCLE_270_RT Circle 270° right-top 7012 = CIRCLE_270_RB Circle 270° right-bottom Ellipse class 8000 = ELLIPSE Ellipse 8001 = ELLIPSE_90_LT Ellipse 90° left-top 8002 = ELLIPSE_90_LB Ellipse 90° left-bottom 8003 = ELLIPSE_90_RT Ellipse 90° right-top 8004 = ELLIPSE_90_RB Ellipse 90° right-bottom 8005 = ELLIPSE_180_L Ellipse 180° left 8006 = ELLIPSE_180_R Ellipse 180° right 8007 = ELLIPSE_180_T Ellipse 180° top 8008 = ELLIPSE_180_B Ellipse 180° bottom 8009 = ELLIPSE_270_LT Ellipse 270° left-top 8010 = ELLIPSE_270_LB Ellipse 270° left-bottom 8011 = ELLIPSE_270_RT Ellipse 270° right-top 8012 = ELLIPSE_270_RB Ellipse 270° right-bottom Triangle class 5000 = TRIANGLE_EQUILATERAL_L Equilateral triangle left 5001 = TRIANGLE_EQUILATERAL_R Equilateral triangle right 5002 = TRIANGLE_EQUILATERAL_T Equilateral triangle top 5003 = TRIANGLE_EQUILATERAL_B Equilateral triangle bottom 5004 = TRIANGLE_ISOSCELES_L Isosceles triangle left 5005 = TRIANGLE_ISOSCELES_R Isosceles triangle right 5006 = TRIANGLE_ISOSCELES_T Isosceles triangle top 5007 = TRIANGLE_ISOSCELES_B Isosceles triangle bottom 5008 = TRIANGLE_RIGHT_LT Right triangle left-top 5009 = TRIANGLE_RIGHT_LB Right triangle left-bottom 5010 = TRIANGLE_RIGHT_RT Right triangle right-top 5011 = TRIANGLE_RIGHT_RB Right triangle right-bottom Other polygons class 6000 = OCTAGON Octagon 6001 = DIAMOND Diamond 6002 = PENTAGON Pentagon 6003 = HEXAGON Hexagon 6004 = LINE Line 6005 = REGION Region Star class 9000 = STAR4 Star 4 points 9001 = STAR5 Star 5 points 9002 = STAR8 Star 8 points 9003 = STAR16 Star 16 points 9004 = STAR24 Star 24 points 9005 = STAR32 Star 36 points Cross class 10000 = CROSS_SMALL Cross small 10001 = CROSS_MEDIUM Cross medium 10002 = CROSS_LARGE Cross large Arrow class 11000 = ARROW_L Arrow left 11001 = ARROW_R Arrow right 11002 = ARROW_T Arrow top 11003 = ARROW_B Arrow bottom 11004 = ARROW2_L_AND_R Arrow2 left and right 11005 = ARROW2_T_AND_B Arrow2 top and bottom 11006 = ARROW2_L_AND_T Arrow2 left and top 11007 = ARROW2_L_AND_B Arrow2 left and bottom 11008 = ARROW2_R_AND_T Arrow2 right and top 11009 = ARROW2_R_AND_B Arrow2 right and bottom 11010 = ARROW3_L_AND_T_AND_R Arrow3 left and top and right 11011 = ARROW3_T_AND_R_AND_B Arrow3 top and right and bottom 11012 = ARROW3_L_AND_B_AND_R Arrow3 left and bottom and right 11013 = ARROW3_L_AND_T_AND_B Arrow3 left and top and bottom 11014 = ARROW4_L_AND_T_AND_R_AND_B Arrow4 left and top and right and bottom
Frame Combine Flags
The following are the flags that define treatment of the source rectangle: 0 = CB_SRC_NOP No change. 1 = CB_SRC_NOT Invert the color, resulting in its complement. 2 = CB_SRC_0 Change all bits to 0. 3 = CB_SRC_1 Change all bits to 1. The following are the flags that define treatment of the destination rectangle: 0 = CB_DST_NOP No change. 16 = CB_DST_NOT Invert the color, resulting in its complement. 32 = CB_DST_0 Change all bits to 0. 48 = CB_DST_1 Change all bits to 1. The following are the flags that define the operation to use when combining the data: 0 = CB_OP_AND Combine each set of bytes using a bitwise AND (&). 256 = CB_OP_OR Combine each set of bytes using a bitwise OR ( | ). 512 = CB_OP_XOR Combine each set of bytes using a bitwise exclusive OR (^). 768 = CB_OP_ADD Add the byte values, allowing a maximum of 255. 1024 = CB_OP_SUBSRC Subtract the source from the destination, allowing a minimum of 0. 1280 = CB_OP_SUBDST Subtract the destination from the source, allowing a minimum of 0. 1536 = CB_OP_MUL Multiply the byte values, allowing a maximum of 255. The result is calculated as follows: result (source * dest) / 255. 1792 = CB_OP_DIVSRC Divide the destination by the source. If source > 0, then the result is calculated as follows: result min( (dest / source) * 255, 255 ). Otherwise, if source 0, then result 255. 2048 = CB_OP_DIVDST Divide the source by the destination. If dest > 0, then the result is calculated as follows: result min( (source / dest) * 255, 255 ). Otherwise, if dest 0, then result 255. 2304 = CB_OP_AVG Use the average of the two values. 2560 = CB_OP_MIN Use the lesser of the two values. 2816 = CB_OP_MAX Use the greater of the two values. The following are the flags that define treatment of the resulting image rectangle: 0 = CB_RES_NOP No change. 4096 = CB_RES_NOT Invert the color, resulting in its complement. 8192 = CB_RES_0 Change all bits to 0. 12288 = CB_RES_1 Change all bits to 1.
Filter Types for PixFilter
Creates an image with an embossed appearance. Choose the appropriate value for the direction of the effect.
0 = FLT_EMBOSS_N 1 = FLT_EMBOSS_NE 2 = FLT_EMBOSS_E 3 = FLT_EMBOSS_SE 4 = FLT_EMBOSS_S 5 = FLT_EMBOSS_SW 6 = FLT_EMBOSS_W 7 = FLT_EMBOSS_NW
Detects edges using a Gradient directional filter. All pixels not on the detected edges are changed to black. Choose the appropriate value for the direction of the effect.
8 = FLT_GRADIENT_N 9 = FLT_GRADIENT_NE 10 = FLT_GRADIENT_E 11 = FLT_GRADIENT_SE 12 = FLT_GRADIENT_S 13 = FLT_GRADIENT_SW 14 = FLT_GRADIENT_W 15 = FLT_GRADIENT_NW
Applies Laplacian line detection. There are three omnidirectional filters and three bi-directional ones. All pixels not on the detected lines are changed to black.
16 = FLT_LAPLACE_1 17 = FLT_LAPLACE_2 18 = FLT_LAPLACE_3 19 = FLT_LAPLACE_DIAG 20 = FLT_LAPLACE_HORZ 21 = FLT_LAPLACE_VERT
Applies Sobel edge detection. All pixels not on the detected edges are changed to black. (The usage is the same as Prewitt, but the algorithm is different.) Choose the appropriate value for horizontal or vertical detection.
22 = FLT_SOBEL_HORZ 23 = FLT_SOBEL_VERT
Applies Prewitt edge detection. All pixels not on the detected edges are changed to black. (The usage is the same as Sobel, but the algorithm is different.) Choose the appropriate value for horizontal or vertical detection.
24 = FLT_PREWITT_HORZ 25 = FLT_PREWITT_VERT
Applies shift-and-difference edge detection. All pixels not on the detected edges are changed to black. Choose the appropriate value for diagonal, horizontal, or vertical detection. 26 = FLT_SHIFTDIFF_DIAG
27 = FLT_SHIFTDIFF_HORZ 28 = FLT_SHIFTDIFF_VERT
Applies line segment line detection. You can use this filter to find line discontinuities in an image. All pixels not on the detected line segments are changed to black. Choose the appropriate value for horizontal, vertical, left-to-right diagonal, or right-to-left diagonal detection.
29 = FLT_LINESEG_HORZ 30 = FLT_LINESEG_VERT 31 = FLT_LINESEG_LTOR 32 = FLT_LINESEG_RTOL
SoftStep is Copyright © 1999-2004 by John Dunn and Algorithmic Arts. All Rights Reserved.