Changeset 2611 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-geopattern.php
- Timestamp:
- 02/25/2016 05:03:19 AM (10 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-geopattern.php
r2560 r2611 1 1 <?php 2 namespace WordPressdotorg\Plugin_Directory; 2 3 3 4 require __DIR__ . '/libs/geopattern-1.1.0/geopattern_loader.php'; 4 5 5 class WPorg_Plugin_Geopattern extends \RedeyeVentures\GeoPattern\GeoPattern { 6 /** 7 * Generates Geopattern icons for Plugins. 8 * 9 * @package WordPressdotorg_Plugin_Directory 10 */ 11 class Plugin_Geopattern extends \RedeyeVentures\GeoPattern\GeoPattern { 6 12 7 13 var $slug; // Hashed to generate pattern … … 19 25 20 26 // Replace the base SVG object with our own, so the dimensions are gettable. 21 $this->svg = new WPorg_Plugin_Geopattern_SVG();27 $this->svg = new Plugin_Geopattern_SVG(); 22 28 } 23 29 … … 38 44 39 45 public function toSVG( $width = 128, $height = 128 ) { 40 $this->svg = new WPorg_Plugin_Geopattern_SVG();46 $this->svg = new Plugin_Geopattern_SVG(); 41 47 $this->generateBackground(); 42 48 … … 69 75 70 76 // The base SVG class doesn't provide functions for getting dimensions, so.. 71 class WPorg_Plugin_Geopattern_SVG extends \RedeyeVentures\GeoPattern\SVG {77 class Plugin_Geopattern_SVG extends \RedeyeVentures\GeoPattern\SVG { 72 78 73 79 protected $viewbox; … … 89 95 90 96 public function addText( $text, $x, $y, $text_anchor, $style, $args=array() ) { 91 $element = new WPorg_Plugin_Geopattern_SVGText($text, $x, $y, $text_anchor, $style, $args);97 $element = new Plugin_Geopattern_SVGText($text, $x, $y, $text_anchor, $style, $args); 92 98 $this->svgString .= $element; 93 99 return $this; … … 106 112 107 113 // Nor does it support text. 108 class WPorg_Plugin_Geopattern_SVGText extends \RedeyeVentures\GeoPattern\SVGElements\Base {114 class Plugin_Geopattern_SVGText extends \RedeyeVentures\GeoPattern\SVGElements\Base { 109 115 protected $tag = 'text'; 110 116 protected $text;
Note: See TracChangeset
for help on using the changeset viewer.