Object-Surface
From Spheriki
(Redirected from Surface)
The Surface object is like an offscreen canvas on which you can draw and manipulate image data.
Contents |
Initializers
Methods
- Surface.applyLookup()
- Surface.applyColorFX()
- Surface.applyColorFX4()
- Surface.blit()
- Surface.blitSurface()
- Surface.clone()
- Surface.cloneSection()
- Surface.createImage()
- Surface.drawText()
- Surface.drawTextBox()
- Surface.drawZoomedText()
- Surface.flipHorizontally()
- Surface.flipVertically()
- Surface.getPixel()
- Surface.line()
- Surface.rectangle()
- Surface.replaceColor()
- Surface.rescale()
- Surface.resize()
- Surface.rotate()
- Surface.save()
- Surface.setAlpha()
- Surface.setBlendMode()
- Surface.setPixel()
- Surface.triangle()
Members
- width number, positive, read-only. Width of the surface in pixels.
- height number, positive, read-only. Height of the surface in pixels.
Notes
- It is faster to blit an image to screen than a surface, but it is much easier to manipulate a surface.
- The Surface object can be used to quickly make custom screenshots:
GrabSurface(0, 0, GetScreenWidth(), GetScreenHeight()).save("my_screenshot.png");
- The fundamental pixel colors can be altered in any way using Surface.applyLookup(), or the Sphere ColorMatrix object functions Surface.applyColorFX() and Surface.applyColorFX4().
See also
- Sphere ColorMatrix object
- Sphere Image object