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 frame
AviSynth.VideoFrame the other frame to draw onto the context frame x
number the x coordinate in pixels y
number 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 frame
AviSynth.VideoFrame the other frame to draw onto the context frame sx
number the x coordinate of the part of the source frame to draw in pixels sy
number the y coordinate of the part of the source frame to draw in pixels sw
number the width of the part of the source frame to draw in pixels sh
number the height of the part of the source frame to draw in pixels dx
number the x coordinate to draw to in this frame dy
number 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 color
number the color as a number x
number the x coordinate in pixels y
number the y coordinate in pixels width
number the width of the rectangle in pixels height
number the height of the rectangle in pixels - Source: