Skip to content

melon.stencil

garryspins edited this page Feb 27, 2026 · 3 revisions

melon.stencil


client link

Stencil helpers
melon

melon.stencil.Start()
   surface.SetDrawColor(255, 255, 255)
   surface.DrawTexturedRectRotated(w / 2, h / 2, w, 50, CurTime() * 10)
melon.stencil.Cut()
   draw.Text({
       text = "Some Text",
       pos = {w / 2, h / 2},
       yalign = 1,
       xalign = 1,
       font = melon.Font(60),
       color = Color(255, 0, 0)
   })
melon.stencil.End()  

Functions

melon.stencil.Cut

client link
melon.stencil.Cut()

Tells the stencil to start cutting

melon.stencil.Deny

client link
melon.stencil.Deny()

Tells the stencil to start cutting but flip it, deny everything thats drawn!

melon.stencil.End

client link
melon.stencil.End()

Ends the cutout

melon.stencil.Start

client link
melon.stencil.Start()

Starts the cutout

Clone this wiki locally