new SimpleRenderingContext()
A rendering context capable of writing on a frame. This class cannot be
constructed directly, instead use AviSynth.VideoFrame#getContext.
- Source:
Methods
-
drawImage(frame, x, y)
-
Draw a different frame onto this frame. The colorspaces of the two frames must match.
Important: This does not composite the source image onto this frame, the entire thing (including alpha channel) is copied directly! (This may be changed in the future by providing a "composite" parameter.)
Parameters:
Name Type Description frameAviSynth.VideoFrame the other frame to draw onto the context frame xnumber the x coordinate in pixels ynumber the y coordinate in pixels - Source:
-
drawImage(frame, sx, sy, sw, sh, dx, dy)
-
Draw a portion of a different frame onto this frame. The colorspaces of the two frames must match.
Important: This does not composite the source image onto this frame, the entire thing (including alpha channel) is copied directly!
Parameters:
Name Type Description frameAviSynth.VideoFrame the other frame to draw onto the context frame sxnumber the x coordinate of the part of the source frame to draw in pixels synumber the y coordinate of the part of the source frame to draw in pixels swnumber the width of the part of the source frame to draw in pixels shnumber the height of the part of the source frame to draw in pixels dxnumber the x coordinate to draw to in this frame dynumber the y coordinate to draw to in this frame - Source:
-
fillRect(color, x, y, width, height)
-
Fill a rectange with the given color. For RGB32 clips, the color is a 32-bit value packed
ARGB. For YUV clips it will probably be YUV packed in some way, assuming contexts for YUV clips are ever supported. (It's also possibly YUV clips will take in a "special" color object and that numbers will always be RGB.)Important: This does not composite the rectangle onto the frame, it completely replaces the pixels, including the alpha channel! (This may be changed in the future by providing a "composite" parameter.)
Parameters:
Name Type Description colornumber the color as a number xnumber the x coordinate in pixels ynumber the y coordinate in pixels widthnumber the width of the rectangle in pixels heightnumber the height of the rectangle in pixels - Source: