enum Cairo::SurfaceType

Overview

SurfaceType is used to describe the type of a given surface. The surface types are also known as "backends" or "surface backends" within cairo.

The type of a surface is determined by the function used to create it, which will generally be of the form Surface#initialize, (though see Surface#create_similar as well).

The surface type can be queried with Surface#type.

The various Surface functions can be used with surfaces of any type, but some backends also provide type-specific functions that must only be called with a surface of the appropriate type. These functions have names that begin with cairo_type_surface such as Surface#width.

The behavior of calling a type-specific function with a surface of the wrong type is undefined.

New entries may be added in future versions.

Defined in:

cairo/surface_type.cr

Enum Members

Image = 0

The surface is of type image.

Pdf = 1

The surface is of type pdf.

Ps = 2

The surface is of type ps.

XLib = 3

The surface is of type xlib.

Xcb = 4

The surface is of type xcb.

Glitz = 5

The surface is of type glitz.

Quartz = 6

The surface is of type quartz.

Win32 = 7

The surface is of type win32.

BeOS = 8

The surface is of type beos.

DirectFB = 9

The surface is of type directfb.

Svg = 10

The surface is of type svg.

OS2 = 11

The surface is of type os2.

Win32Printing = 12

The surface is a win32 printing surface.

QuartzImage = 13

The surface is of type quartz_image.

Script = 14

The surface is of type scrip.

Qt = 15

The surface is of type Qt.

Recording = 16

The surface is of type recording.

VG = 17

The surface is a OpenVG surface.

GL = 18

The surface is of type OpenGL.

DRM = 19

The surface is of type Direct Render Manager.

Tee = 20

The surface is of type 'tee' (a multiplexing surface).

XML = 21

The surface is of type XML (for debugging).

Skia = 22

The surface is of type Skia.

Subsurface = 23

The surface is a subsurface created with Surface#create_for_rectangle.

COGL = 24

This surface is of type Cogl.

Instance Method Summary

Instance Method Detail

def be_os? #

[View source]
def cogl? #

[View source]
def direct_fb? #

[View source]
def drm? #

[View source]
def gl? #

[View source]
def glitz? #

[View source]
def image? #

[View source]
def os2? #

[View source]
def pdf? #

[View source]
def ps? #

[View source]
def qt? #

[View source]
def quartz? #

[View source]
def quartz_image? #

[View source]
def recording? #

[View source]
def script? #

[View source]
def skia? #

[View source]
def subsurface? #

[View source]
def svg? #

[View source]
def tee? #

[View source]
def vg? #

[View source]
def win32? #

[View source]
def win32_printing? #

[View source]
def x_lib? #

[View source]
def xcb? #

[View source]
def xml? #

[View source]