示例#1
0
 /**
  * @param $text
  * @param string | null $alt
  * @param array | null $attr
  * @return string
  * @throws Exception
  */
 public static function img($text, $alt = null, $attr = null)
 {
     if (!self::$_instance) {
         self::_instance();
     }
     self::$_instance->initialize();
     return self::$_instance->_create($text, $attr)->_img($alt);
 }
示例#2
0
 /**
  * Get navigation items.
  * @return array
  */
 public function view()
 {
     $this->nav = [];
     foreach (Config::get('nav.main') as $key => $menu) {
         $this->nav['main'][] = ['blob' => ImageText::blob($menu, ['color' => 'FFFFFF', 'size' => 13]), 'alt' => $menu];
     }
     foreach (Config::get('nav.sub') as $key => $menus) {
         foreach ($menus as $index => $menu) {
             $this->nav['sub'][$index][] = ['blob' => ImageText::blob($menu), 'alt' => $menu];
         }
     }
 }
示例#3
0
 /**
  * @before _secure, changeLayout, _admin
  */
 public function imagetextitem($imagetext_id)
 {
     $this->seo(array("title" => "Looklike Content", "view" => $this->getLayoutView()));
     $view = $this->getActionView();
     $imagetext = ImageText::first(array("id = ?" => $imagetext_id));
     if (RequestMethods::post("action") == "shuffle") {
         $imagetextitem = new ImageTextItem(array("imagetext_id" => $imagetext->id, "meta_key" => "gender", "meta_value" => RequestMethods::post("gender"), "image" => $this->_upload("image"), "live" => true, "text" => RequestMethods::post("text")));
         $imagetextitem->save();
         $view->set("success", true);
     }
     $imagetextitems = ImageTextItem::all(array("imagetext_id = ?" => $imagetext->id));
     $view->set("imagetext", $imagetext);
     $view->set("imagetextitems", $imagetextitems);
 }
示例#4
0
         if (!empty($jieqiConfigs['obook']['obkcharconvert'])) {
             $outstr = jieqi_big52gb($outstr);
             $watertext = jieqi_big52gb($watertext);
             $fontcharset = JIEQI_CHAR_SET;
         }
     }
 }
 $changefun = '';
 if (isset($charsetary[$fontcharset])) {
     $changefun = 'jieqi_' . $charsetary[$fontcharset] . '2utf8';
 }
 if (function_exists($changefun)) {
     $outstr = call_user_func($changefun, $outstr);
     $watertext = call_user_func($changefun, $watertext);
 }
 $img = new ImageText();
 $img->set('text', $outstr);
 $img->set('startx', $jieqiConfigs['obook']['obkstartx']);
 $img->set('starty', $jieqiConfigs['obook']['obkstarty']);
 $img->set('fontsize', $jieqiConfigs['obook']['obkfontsize']);
 if (JIEQI_CHAR_SET == 'big5') {
     $img->set('fontfile', $jieqiConfigs['obook']['obkfontft']);
 } else {
     $img->set('fontfile', $jieqiConfigs['obook']['obkfontjt']);
 }
 $img->set('angle', $jieqiConfigs['obook']['obkangle']);
 $img->set('imagecolor', $jieqiConfigs['obook']['obkimagecolor']);
 $img->set('textcolor', $jieqiConfigs['obook']['obktextcolor']);
 $img->set('shadowcolor', $jieqiConfigs['obook']['obkshadowcolor']);
 $img->set('shadowdeep', $jieqiConfigs['obook']['obkshadowdeep']);
 $img->set('imagetype', $jieqiConfigs['obook']['obkimagetype']);
示例#5
0
                $data = array();
                //inicializuojam kiekvieno menesio kiekius
                foreach ($menesiai as $i) {
                    $data[$i] = 0;
                }
                foreach ($is as $menuo => $valandos) {
                    $data[$menesiai[$menuo]] = $valandos;
                }
                //tikrinama ar rastas padalinys yra rodomu padaliniu sarase
                if (in_array($idIs, $rodomosIs)) {
                    $chartData[] = $data;
                    $chartLineColors[] = generateChartColor($idIs);
                }
            }
        }
        //nerasta pasirinktu padaliniu
        if (sizeof($chartData) == 0) {
            $data = array();
            $data[1] = 0;
            $chartData[] = array(0);
            $chartLineColors[] = 'black';
        }
        call_user_func_array(array($graph, "addData"), $chartData);
        call_user_func_array(array($graph, "setLineColor"), $chartLineColors);
        drawPrognosisGraph($graph);
        break;
    default:
        ImageText::createTextImage($chartWidth, $chartHeight, "Bloga diagramos rūšis");
        exit(0);
        break;
}
示例#6
0
<?php

namespace cd;

set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/../core/');
require_once 'core.php';
require_once 'ImageText.php';
$file = '/home/ml/Skrivbord/DSC_1853.JPG';
$font = '/home/ml/dev/data_fonts_DroidSerif-Bold.ttf';
// $font = '/home/ml/dev/Averia-Libre-Regular.woff';  //XXX dont work with woff files, 2012-05-16
$x = new ImageText($file);
$x->writeText('abc', $font);
$x->render('gif', 'texted.gif', array(), 30);
echo "wrote to " . $x->getWidth() . "x" . $x->getHeight() . "\n";
示例#7
0
文件: hello.php 项目: NoguHiro/metro
		<div class="container">
			<div id="logo"></div>
		</div>
	</header>
	<div class="container">
		<div class="row">
			<div class="col-md-12">

				<h1>Hello, <?php 
echo $name;
?>
! <small>Congratulations, you just used a Presenter!</small></h1>
				<hr>
                <div class="tag-icons">
                    <?php 
echo ImageText::img('美少女', null, array('color' => 'FFFFFF'));
?>
                </div>
                <hr/>
                <p>The controller generating this page is found at <code>APPPATH/classes/controller/welcome.php</code>.</p>
				<p>This view is located at <code>APPPATH/views/welcome/hello.php</code>.</p>
				<p>It is loaded via a Presenter class with a name of <code>Presenter_Welcome_Hello</code>, located in <code>APPPATH/classes/presenter/welcome/hello.php</code></p>
			</div>
		</div>
		<footer>
			<p class="pull-right">Page rendered in {exec_time}s using {mem_usage}mb of memory.</p>
			<p>
				<a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.<br>
				<small>Version: <?php 
echo Fuel::VERSION;
?>
示例#8
0
文件: index.php 项目: NoguHiro/metro
			width: 100%;
			margin-bottom: 40px;
		}
		a{
			color: #883ced;
		}
		a:hover{
			color: #af4cf0;
		}
		.btn.btn-primary{color:#ffffff!important;background-color:#883ced;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#fd6ef7), to(#883ced));background-image:-moz-linear-gradient(top, #fd6ef7, #883ced);background-image:-ms-linear-gradient(top, #fd6ef7, #883ced);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fd6ef7), color-stop(100%, #883ced));background-image:-webkit-linear-gradient(top, #fd6ef7, #883ced);background-image:-o-linear-gradient(top, #fd6ef7, #883ced);background-image:linear-gradient(top, #fd6ef7, #883ced);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fd6ef7', endColorstr='#883ced', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#883ced #883ced #003f81;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}
		body { margin: 0px 0px 40px 0px; }
	</style>
</head>
<body>
<?php 
echo ImageText::img('hoge');
?>
	<header>
		<div class="container">
			<div id="logo"></div>
		</div>
	</header>
	<div class="container">
		<div class="jumbotron">
			<h1>Welcome!</h1>
			<p>You have successfully installed the FuelPHP Framework.</p>
			<p><a class="btn btn-primary btn-lg" href="http://docs.fuelphp.com">Read the Docs</a></p>
		</div>
		<div class="row">
			<div class="col-md-4">
				<h2>Get Started</h2>
示例#9
0
<?php

session_start();
require_once "../Includes.php";
ImageText::createTextImage(550, 200, "Not very simple");
//print("čęąėįšų");