Ignore:
Timestamp:
2013/02/18 19:09:54 (11 years ago)
Author:
shutta
Message:

#2043 (typo修正・ソース整形・ソースコメントの改善 for 2.12.4)
Zend Framework PHP 標準コーディング規約のコーディングスタイルへ準拠。
classおよびfunctionの開始波括弧「{」のスタイルを修正。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/graph/SC_Graph_Base.php

    r22206 r22567  
    131131 * @version $Id$ 
    132132 */ 
    133 class SC_Graph_Base { 
     133class SC_Graph_Base  
     134{ 
    134135 
    135136    // {{{ properties 
     
    182183 
    183184    // コンストラクタ 
    184     function __construct($bgw, $bgh, $left, $top) { 
     185    function __construct($bgw, $bgh, $left, $top) 
     186    { 
    185187        $this->init(); 
    186188        // 画像作成 
     
    211213 
    212214    // リサンプル(画像を滑らかに縮小する) 
    213     function resampled() { 
     215    function resampled() 
     216    { 
    214217        $new_width = $this->bgw * 0.8; 
    215218        $new_height = $this->bgh * 0.8; 
     
    221224 
    222225    // オブジェクトカラーの設定 
    223     function setColorList($arrRGB) { 
     226    function setColorList($arrRGB) 
     227    { 
    224228        $this->arrRGB = $arrRGB; 
    225229        $count = count($this->arrRGB); 
     
    235239 
    236240    // 影のありなし 
    237     function setShadeOn($shade_on) { 
     241    function setShadeOn($shade_on) 
     242    { 
    238243        $this->shade_on = $shade_on; 
    239244    } 
    240245 
    241246    // 画像を出力する 
    242     function outputGraph($header = true, $filename = '') { 
     247    function outputGraph($header = true, $filename = '') 
     248    { 
    243249        if ($header) { 
    244250            header('Content-type: image/png'); 
     
    255261 
    256262    // 描画時のテキスト幅を求める 
    257     function getTextWidth($text, $font_size) { 
     263    function getTextWidth($text, $font_size) 
     264    { 
    258265        $text_len = strlen($text); 
    259266        $ret = $font_size * $text_len * TEXT_RATE; 
     
    268275 
    269276    // テキストを出力する 
    270     function setText($font_size, $left, $top, $text, $color = NULL, $angle = 0, $labelbg = false) { 
     277    function setText($font_size, $left, $top, $text, $color = NULL, $angle = 0, $labelbg = false) 
     278    { 
    271279        // 時計回りに角度を変更 
    272280        $angle = -$angle; 
     
    300308 
    301309    // タイトルを出力する 
    302     function drawTitle($text, $font_size = TITLE_FONT_SIZE) { 
     310    function drawTitle($text, $font_size = TITLE_FONT_SIZE) 
     311    { 
    303312        // 出力位置の算出 
    304313        $text_width = $this->getTextWidth($text, $font_size); 
     
    309318 
    310319    // ログを出力する 
    311     function debugPrint($text) { 
     320    function debugPrint($text) 
     321    { 
    312322        $text = mb_convert_encoding($text, 'UTF-8', CHAR_CODE); 
    313323        if (!isset($this->text_top)) { 
     
    320330 
    321331    // カラーラベルを描画 
    322     function drawLegend($legend_max = '', $clabelbg = true) { 
     332    function drawLegend($legend_max = '', $clabelbg = true) 
     333    { 
    323334        // 凡例が登録されていなければ中止 
    324335        if (count($this->arrLegend) <= 0) { 
     
    369380 
    370381    // カラーラベル背景の描画 
    371     function drawClabelBG($left, $top, $right, $bottom) { 
     382    function drawClabelBG($left, $top, $right, $bottom) 
     383    { 
    372384        // 影の描画 
    373385        if ($this->shade_on) { 
     
    380392 
    381393    // 凡例をセットする 
    382     function setLegend($arrLegend) { 
     394    function setLegend($arrLegend) 
     395    { 
    383396        $this->arrLegend = array_values((array)$arrLegend); 
    384397    } 
     
    395408     * @return void 
    396409     */ 
    397     function init() { 
     410    function init() 
     411    { 
    398412        // 凡例背景 
    399413        $this->ARR_LEGENDBG_COLOR = array(245,245,245); 
     
    437451     * @return array 円の中心点と直径から弧の終端座標の配列 
    438452     */ 
    439     function lfGetArcPos($cx, $cy, $cw, $ch, $e) { 
     453    function lfGetArcPos($cx, $cy, $cw, $ch, $e) 
     454    { 
    440455        // 三角関数用の角度を求める 
    441456        $s = 90 - $e; 
     
    448463 
    449464    /** 画像にテキストを描画する */ 
    450     function lfImageText($dst_image, $text, $font_size, $left, $top, $font, $arrRGB) { 
     465    function lfImageText($dst_image, $text, $font_size, $left, $top, $font, $arrRGB) 
     466    { 
    451467        $color = ImageColorAllocate($dst_image, $arrRGB[0], $arrRGB[1], $arrRGB[2]); 
    452468        $text = mb_convert_encoding($text, 'UTF-8', CHAR_CODE); 
     
    458474 
    459475    /** 表示色の取得 */ 
    460     function lfGetImageColor($image, $array) { 
     476    function lfGetImageColor($image, $array) 
     477    { 
    461478        if (count($array) != 3) { 
    462479            return NULL; 
     
    467484 
    468485    /** 影用表示色の取得 */ 
    469     function lfGetImageDarkColor($image, $array) { 
     486    function lfGetImageDarkColor($image, $array) 
     487    { 
    470488        if (count($array) != 3) { 
    471489            return NULL; 
Note: See TracChangeset for help on using the changeset viewer.