pyglet.enums
- class AddressMode
Texture sampling behavior outside the [0, 1] coordinate range.
- CLAMP_TO_BORDER = 4
- CLAMP_TO_EDGE = 3
- MIRRORED_REPEAT = 2
- REPEAT = 1
- class AnimationChannelTargetPath
- __new__(value)
- ROTATION = 'rotation'
- SCALE = 'scale'
- TRANSLATION = 'translation'
- WEIGHTS = 'weights'
- class AnimationInterpolation
- __new__(value)
- CUBIC_SPLINE = 'CUBICSPLINE'
- LINEAR = 'LINEAR'
- STEP = 'STEP'
- class BlendFactor
Blend factors used for color blending operations.
- CONSTANT_ALPHA = 'CONSTANT_ALPHA'
- CONSTANT_COLOR = 'CONSTANT_COLOR'
- DST_ALPHA = 'DST_ALPHA'
- DST_COLOR = 'DST_COLOR'
- ONE = 'ONE'
- ONE_MINUS_CONSTANT_ALPHA = 'ONE_MINUS_CONSTANT_ALPHA'
- ONE_MINUS_CONSTANT_COLOR = 'ONE_MINUS_CONSTANT_COLOR'
- ONE_MINUS_DST_ALPHA = 'ONE_MINUS_DST_ALPHA'
- ONE_MINUS_DST_COLOR = 'ONE_MINUS_DST_COLOR'
- ONE_MINUS_SRC_ALPHA = 'ONE_MINUS_SRC_ALPHA'
- ONE_MINUS_SRC_COLOR = 'ONE_MINUS_SRC_COLOR'
- SRC_ALPHA = 'SRC_ALPHA'
- SRC_COLOR = 'SRC_COLOR'
- ZERO = 'ZERO'
- class BlendOp
Blend operations used when combining source and destination colors.
- ADD = 'ADD'
- MAX = 'MAX'
- MIN = 'MIN'
- REVERSE_SUBTRACT = 'REVERSE_SUBTRACT'
- SUBTRACT = 'SUBTRACT'
- class CompareOp
Comparison operations used for depth or sampler comparisons.
- ALWAYS = 8
- EQUAL = 3
- GREATER = 5
- GREATER_OR_EQUAL = 7
- LESS = 2
- LESS_OR_EQUAL = 4
- NEVER = 1
- NOT_EQUAL = 6
- class ComponentFormat
Texture component format identifiers.
- __new__(value)
- BGR = 'BGR'
- BGRA = 'BGRA'
- D = 'D'
- DS = 'DS'
- L = 'L'
- LA = 'LA'
- R = 'R'
- RG = 'RG'
- RGB = 'RGB'
- RGBA = 'RGBA'
- class FramebufferAttachment
Framebuffer attachment points.
- COLOR0 = 1
- COLOR1 = 2
- COLOR10 = 11
- COLOR11 = 12
- COLOR12 = 13
- COLOR13 = 14
- COLOR14 = 15
- COLOR15 = 16
- COLOR2 = 3
- COLOR3 = 4
- COLOR4 = 5
- COLOR5 = 6
- COLOR6 = 7
- COLOR7 = 8
- COLOR8 = 9
- COLOR9 = 10
- DEPTH = 17
- DEPTH_STENCIL = 19
- STENCIL = 18
- class GeometryMode
Primitive drawing modes for geometry.
- LINES = 2
- LINE_STRIP = 3
- POINTS = 1
- TRIANGLES = 4
- TRIANGLE_FAN = 6
- TRIANGLE_STRIP = 5
- class GraphicsAPI
Supported graphics backends.
- __new__(value)
- OPENGL = 'opengl'
- OPENGL_2 = 'gl2'
- OPENGL_ES_2 = 'gles2'
- OPENGL_ES_3 = 'gles3'
- VULKAN = 'vulkan'
- WEBGL = 'webgl'
- class Stretch
The stretch or width class of the font.
- __new__(value)
- CONDENSED = 'condensed'
- EXPANDED = 'expanded'
- EXTRACONDENSED = 'extracondensed'
- EXTRAEXPANDED = 'extraexpanded'
- NORMAL = 'normal'
The default stretch for a font.
- SEMICONDENSED = 'semicondensed'
- SEMIEXPANDED = 'semiexpanded'
- ULTRACONDENSED = 'ultracondensed'
- ULTRAEXPANDED = 'ultraexpanded'
- class Style
The slant style of the font.
- __new__(value)
- ITALIC = 'italic'
- NORMAL = 'normal'
The default style for a font.
- OBLIQUE = 'oblique'
- class TextureType
Texture target/type identifiers.
- TYPE_1D = 1
- TYPE_1D_ARRAY = 5
- TYPE_2D = 2
- TYPE_2D_ARRAY = 6
- TYPE_3D = 3
- TYPE_CUBE_MAP = 4
- TYPE_CUBE_MAP_ARRAY = 7
- class Weight
An
Enumof known cross-platform font weight strings.Each value is both an
Enumand astr. This is not a built-in PythonStrEnumto ensure compatibility with Python < 3.11.Important
Fonts will use the closest match if they lack a weight.
The values of this enum imitate the string names for font weights as used in CSS and the OpenType specification. Numerical font weights are not supported because:
Integer font weight support and behavior varies by back-end
Some font renderers do not support or round
floatvaluesSome font renderers lack support for variable-width fonts
Additional weight strings may be supported by certain font-rendering back-ends. To learn more, please see your platform’s API documentation and the following:
- __new__(value)
- BLACK = 'black'
- BOLD = 'bold'
The default bold style for a font.
- EXTRABLACK = 'extrablack'
- EXTRABOLD = 'extrabold'
- EXTRALIGHT = 'extralight'
- LIGHT = 'light'
- MEDIUM = 'medium'
- NORMAL = 'normal'
The default weight for a font.
- SEMIBOLD = 'semibold'
- THIN = 'thin'