Class: Gsk::BorderNode

Inherits:
RenderNode show all
Defined in:
(unknown)

Overview

A render node for a border.

Instance Method Summary collapse

Methods inherited from RenderNode

deserialize, #draw, #get_bounds, #node_type, #ref, #serialize, #unref, #write_to_file

Constructor Details

#initialize(outline, border_width, border_color) ⇒ Gsk::BorderNode

Creates a GskRenderNode that will stroke a border rectangle inside the given outline.

The 4 sides of the border can have different widths and colors.

Parameters:

  • outline (Gsk::RoundedRect)

    a GskRoundedRect describing the outline of the border

  • border_width (Array<Gsk::gfloat>)

    the stroke width of the border on the top, right, bottom and left side respectively.

  • border_color (Array<Gdk::RGBA>)

    the color used on the top, right, bottom and left side.

Instance Method Details

#colorsGdk::RGBA

Retrieves the colors of the border.

Returns:

  • (Gdk::RGBA)

    an array of 4 GdkRGBA structs for the top, right, bottom and left color of the border

#outlineGsk::RoundedRect

Retrieves the outline of the border.

Returns:

#widthsArray<Gsk::gfloat>

Retrieves the stroke widths of the border.

Returns:

  • (Array<Gsk::gfloat>)

    an array of 4 floats for the top, right, bottom and left stroke width of the border, respectively