Posts

Showing posts from December, 2012

Symbolism

So I've devised a way to pragmatically draw my sign in code using the GD library in PHP. Copyright Markizano.NET, LLC. All rights reserved. As long as the dimensions are 2x3, the measurements should evolve appropriately. For example, if you start with an empty transparent 200x300, then it should look appropriate. Devised below: <?php header("X-Author: Markizano Draconus"); header("Content-Type: image/png"); # An empty canvas of an image. Just an empty, transparent PNG image. define("IMG", "Altrish.png"); $png = imagecreatefrompng(IMG); imagealphablending($png, false); imagesavealpha($png, true); $stat = new stdClass; $leftHyp = new stdClass; $rightHyp = new stdClass; $halfPy = new stdClass; $margin = 10; # 200, 300 list($stat->canvasWidth, $stat->canvasHeight) = getimagesize(IMG); $stat->width = $stat->canvasWidth - ($margin*2); # Image area width, adding padding from the edge. $stat->height = $stat->canvasHeight - (...