PATH:
home
/
lab2454c
/
costbloc.com
/
vendor
/
mpdf
/
mpdf
/
src
/
Tag
<?php namespace Mpdf\Tag; class Progress extends Meter { protected function makeSVG($type, $value, $max, $min, $optimum, $low, $high) { $svg = ''; if ($type == '2') { ///////////////////////////////////////////////////////////////////////////////////// ///////// CUSTOM <progress type="2"> ///////////////////////////////////////////////////////////////////////////////////// } else { ///////////////////////////////////////////////////////////////////////////////////// ///////// DEFAULT <progress> ///////////////////////////////////////////////////////////////////////////////////// $h = 10; $w = 100; $border_radius = 0.143; // Factor of Height if ($value or $value === '0') { $fill = 'url(#GrGRAY)'; } else { $fill = '#f8f8f8'; } $svg = '<svg width="' . $w . 'px" height="' . $h . 'px" viewBox="0 0 ' . $w . ' ' . $h . '"><g> <defs> <linearGradient id="GrGRAY" x1="0" y1="0" x2="0" y2="1" gradientUnits="boundingBox"> <stop offset="0%" stop-color="rgb(222, 222, 222)" /> <stop offset="20%" stop-color="rgb(232, 232, 232)" /> <stop offset="25%" stop-color="rgb(232, 232, 232)" /> <stop offset="100%" stop-color="rgb(182, 182, 182)" /> </linearGradient> <linearGradient id="GrGREEN" x1="0" y1="0" x2="0" y2="1" gradientUnits="boundingBox"> <stop offset="0%" stop-color="rgb(102, 230, 102)" /> <stop offset="20%" stop-color="rgb(218, 255, 218)" /> <stop offset="25%" stop-color="rgb(218, 255, 218)" /> <stop offset="100%" stop-color="rgb(0, 148, 0)" /> </linearGradient> </defs> <rect x="0" y="0" rx="' . ($h * $border_radius) . 'px" ry="' . ($h * $border_radius) . 'px" width="' . $w . '" height="' . $h . '" fill="' . $fill . '" stroke="none" /> '; if ($value) { $barw = (($value - $min) / ($max - $min) ) * $w; $barcol = 'url(#GrGREEN)'; $svg .= '<rect x="0" y="0" rx="' . ($h * $border_radius) . 'px" ry="' . ($h * $border_radius) . 'px" width="' . $barw . '" height="' . $h . '" fill="' . $barcol . '" stroke="none" />'; } // Borders $svg .= '<rect x="0" y="0" rx="' . ($h * $border_radius) . 'px" ry="' . ($h * $border_radius) . 'px" width="' . $w . '" height="' . $h . '" fill="none" stroke="#888888" stroke-width="0.5px" />'; if ($value) { // $svg .= '<rect x="0" y="0" rx="'.($h*$border_radius).'px" ry="'.($h*$border_radius).'px" width="'.$barw.'" height="'.$h.'" fill="none" stroke="#888888" stroke-width="0.5px" />'; } $svg .= '</g></svg>'; } return $svg; } }
[-] Sup.php
[edit]
[-] Footer.php
[edit]
[-] Strong.php
[edit]
[-] TBody.php
[edit]
[-] H3.php
[edit]
[-] Dt.php
[edit]
[-] HGroup.php
[edit]
[-] H4.php
[edit]
[-] WatermarkText.php
[edit]
[-] Ttz.php
[edit]
[-] Meter.php
[edit]
[-] TocPageBreak.php
[edit]
[-] H1.php
[edit]
[-] NewPage.php
[edit]
[-] Section.php
[edit]
[-] Small.php
[edit]
[-] Input.php
[edit]
[-] IndexInsert.php
[edit]
[-] Pre.php
[edit]
[-] PageBreak.php
[edit]
[-] Option.php
[edit]
[+]
..
[-] BlockQuote.php
[edit]
[-] Big.php
[edit]
[-] PageFooter.php
[edit]
[-] Address.php
[edit]
[-] Columns.php
[edit]
[-] H5.php
[edit]
[-] Span.php
[edit]
[-] WatermarkImage.php
[edit]
[-] Legend.php
[edit]
[-] TocEntry.php
[edit]
[-] Bdo.php
[edit]
[-] Div.php
[edit]
[-] SubstituteTag.php
[edit]
[-] TFoot.php
[edit]
[-] Form.php
[edit]
[-] Table.php
[edit]
[-] Tts.php
[edit]
[-] I.php
[edit]
[-] Ol.php
[edit]
[-] Samp.php
[edit]
[-] Bdi.php
[edit]
[-] Kbd.php
[edit]
[-] P.php
[edit]
[-] Img.php
[edit]
[-] Tta.php
[edit]
[-] S.php
[edit]
[-] Header.php
[edit]
[-] Details.php
[edit]
[-] Code.php
[edit]
[-] A.php
[edit]
[-] Mark.php
[edit]
[-] IndexEntry.php
[edit]
[-] Bookmark.php
[edit]
[-] DotTab.php
[edit]
[-] THead.php
[edit]
[-] Main.php
[edit]
[-] Progress.php
[edit]
[-] Article.php
[edit]
[-] Center.php
[edit]
[-] Dl.php
[edit]
[-] Ul.php
[edit]
[-] SetPageHeader.php
[edit]
[-] Del.php
[edit]
[-] Figure.php
[edit]
[-] FieldSet.php
[edit]
[-] FormFeed.php
[edit]
[-] Ins.php
[edit]
[-] Cite.php
[edit]
[-] Strike.php
[edit]
[-] PageHeader.php
[edit]
[-] Summary.php
[edit]
[-] H6.php
[edit]
[-] NewColumn.php
[edit]
[-] TextArea.php
[edit]
[-] Tr.php
[edit]
[-] H2.php
[edit]
[-] Td.php
[edit]
[-] SetHtmlPageHeader.php
[edit]
[-] B.php
[edit]
[-] Select.php
[edit]
[-] Toc.php
[edit]
[-] Caption.php
[edit]
[-] Sub.php
[edit]
[-] Font.php
[edit]
[-] BarCode.php
[edit]
[-] Q.php
[edit]
[-] FigCaption.php
[edit]
[-] SetPageFooter.php
[edit]
[-] U.php
[edit]
[-] Hr.php
[edit]
[-] Nav.php
[edit]
[-] ColumnBreak.php
[edit]
[-] Time.php
[edit]
[-] Br.php
[edit]
[-] Dd.php
[edit]
[-] SetHtmlPageFooter.php
[edit]
[-] VarTag.php
[edit]
[-] Annotation.php
[edit]
[-] Aside.php
[edit]
[-] Li.php
[edit]
[-] Acronym.php
[edit]
[-] BlockTag.php
[edit]
[-] Tt.php
[edit]
[-] Tag.php
[edit]
[-] Em.php
[edit]
[-] Th.php
[edit]
[-] InlineTag.php
[edit]
[-] TextCircle.php
[edit]