1<?php 2// $Header: /cvsroot/html2ps/css.text-indent.inc.php,v 1.13 2006/11/11 13:43:52 Konstantin Exp $ 3 4require_once(HTML2PS_DIR.'value.text-indent.class.php'); 5 6class CSSTextIndent extends CSSPropertyHandler { 7 function CSSTextIndent() { 8 $this->CSSPropertyHandler(true, true); 9 } 10 11 function default_value() { 12 return new TextIndentValuePDF(array(0,false)); 13 } 14 15 function parse($value) { 16 if ($value === 'inherit') { 17 return CSS_PROPERTY_INHERIT; 18 }; 19 20 if (is_percentage($value)) { 21 return new TextIndentValuePDF(array((int)$value, true)); 22 } else { 23 return new TextIndentValuePDF(array($value, false)); 24 }; 25 } 26 27 function get_property_code() { 28 return CSS_TEXT_INDENT; 29 } 30 31 function get_property_name() { 32 return 'text-indent'; 33 } 34} 35 36CSS::register_css_property(new CSSTextIndent()); 37 38?> 39