Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core_geopattern Class Reference
Inheritance diagram for core_geopattern:
RedeyeVentures\GeoPattern\GeoPattern

Public Member Functions

 __toString ()
 
 datauri ()
 
 getString ()
 
 patternbyid ($uniqueid)
 Add variables.
 
 setBaseColor ($baseColor)
 
 setColor ($color)
 
 setGenerator ($generator)
 
 setString ($string)
 
 toBase64 ()
 
 toDataURI ()
 
 toDataURL ()
 
 toSVG ()
 

Public Attributes

const FILL_COLOR_DARK = '#222'
 
const FILL_COLOR_LIGHT = '#ddd'
 
const OPACITY_MAX = '0.15'
 
const OPACITY_MIN = '0.02'
 
const STROKE_COLOR = '#000'
 
const STROKE_OPACITY = '0.02'
 

Protected Member Functions

 buildChevronShape ($width, $height)
 
 buildDiamondShape ($width, $height)
 
 buildHexagonShape ($sideLength)
 
 buildOctogonShape ($squareSize)
 
 buildPlusShape ($squareSize)
 
 buildRightTriangleShape ($sideLength)
 
 buildRotatedTriangleShape ($sideLength, $width)
 
 buildTriangleShape ($sideLength, $height)
 
 drawInnerMosaicTile ($x, $y, $triangleSize, $vals)
 
 drawOuterMosaicTile ($x, $y, $triangleSize, $val)
 
 fillColor ($val)
 
 generateBackground ()
 
 generatePattern ()
 
 geoChevrons ()
 
 geoConcentricCircles ()
 
 geoDiamonds ()
 
 geoHexagons ()
 
 geoMosaicSquares ()
 
 geoNestedSquares ()
 
 geoOctogons ()
 
 geoOverlappingCircles ()
 
 geoOverlappingRings ()
 
 geoPlaid ()
 
 geoPlusSigns ()
 
 geoSineWaves ()
 
 geoSquares ()
 
 geoTessellation ()
 
 geoTriangles ()
 
 geoTrianglesRotated ()
 
 geoXes ()
 
 hexToHSL ($color)
 
 hexToRGB ($hex)
 
 hexVal ($index, $len)
 
 hslToRGB ($h, $s, $l)
 
 map ($value, $vMin, $vMax, $dMin, $dMax)
 
 opacity ($val)
 
 rgbToHex ($r, $g, $b)
 
 rgbToHSL ($r, $g, $b)
 

Protected Attributes

 $baseColor
 
 $color
 
 $generator
 
 $hash
 
 $patterns
 
 $string
 
 $svg
 

Member Function Documentation

◆ patternbyid()

core_geopattern::patternbyid ( $uniqueid)

Add variables.

Parameters
array$scssAssociative array of variables and their values.
Return values
void

Member Data Documentation

◆ $patterns

RedeyeVentures\GeoPattern\GeoPattern::$patterns
protectedinherited
Initial value:
= [
'octogons',
'overlapping_circles',
'plus_signs',
'xes',
'sine_waves',
'hexagons',
'overlapping_rings',
'plaid',
'triangles',
'squares',
'concentric_circles',
'diamonds',
'tessellation',
'nested_squares',
'mosaic_squares',
'triangles_rotated',
'chevrons',
]

The documentation for this class was generated from the following file: