Cogl.Framebuffer.prototype.draw_rectangle

function draw_rectangle(pipeline: Cogl.Pipeline, x_1: Number(gfloat), y_1: Number(gfloat), x_2: Number(gfloat), y_2: Number(gfloat)): void {
    // Gjs wrapper for cogl_framebuffer_draw_rectangle()
}
  

Draws a rectangle to framebuffer with the given pipeline state and with the top left corner positioned at (x_1, y_1) and the bottom right corner positioned at (x_2, y_2).

<note>The position is the position before the rectangle has been transformed by the model-view matrix and the projection matrix.</note>

<note>If you want to describe a rectangle with a texture mapped on it then you can use Cogl.Framebuffer.prototype.draw_textured_rectangle.</note>

Since 1.10

pipeline

A Cogl.Pipeline state object

x_1

X coordinate of the top-left corner

y_1

Y coordinate of the top-left corner

x_2

X coordinate of the bottom-right corner

y_2

Y coordinate of the bottom-right corner