Giter Site home page Giter Site logo

wrecyclerview's Introduction

BaseRecyclerAdapter

$charFactor = 1; $textLen = mb_strlen($text); $imageWidth = $textLen * $charWidth * $charFactor; $imageHeight = $fontsize; $logoimg = imagecreatetruecolor($imageWidth, $imageHeight); imagealphablending($logoimg, false); imagesavealpha($logoimg, true); $col = imagecolorallocatealpha($logoimg, 255, 255, 255, 127); imagefill($logoimg, 0, 0, $col); $white = imagecolorallocate($logoimg, $rgbColors[0], $rgbColors[1], $rgbColors[2]); //for font color $x = 0; $y = $fontsize; $angle = 0; $bbox = imagettftext($logoimg, $fontsize, $angle, $x, $y, $white, $font, $text); //fill text in your image $boxWidth = $bbox[4] - $bbox[0]; $boxHeight = $bbox[7] - $bbox[1]; imagedestroy($logoimg); //-------------------------------------------- // CREATE THE PNG //-------------------------------------------- $imageWidth = abs($boxWidth); $imageHeight = abs($boxHeight); $logoimg = imagecreatetruecolor($imageWidth, $imageHeight); imagealphablending($logoimg, false); imagesavealpha($logoimg, true); $col = imagecolorallocatealpha($logoimg, 255, 255, 255, 127); imagefill($logoimg, 0, 0, $col); $white = imagecolorallocate($logoimg, $rgbColors[0], $rgbColors[1], $rgbColors[2]); //for font color $x = 0; $y = $fontsize; $angle = 0; imagettftext($logoimg, $fontsize, $angle, $x, $y, $white, $font, $text); //fill text in your image imagepng($logoimg); //save your image at new location $target imagedestroy($logoimg);

This is some red text.

This is some text! These are red words .

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100" height="50"

Hello, world!
  • #f03c15 #f03c15
  • #c5f015 #c5f015
  • #1589F0 #1589F0
   // code for coloring
   // code for coloring
   // code for coloring
   // code for coloring
+ this will be highlighted in green
- this will be highlighted in red

color=gray

我颜色为红色
我颜色为红色

Some green text Some green text

文档请查看 http://blog.csdn.net/u012551350/article/details/52026740

http://blog.csdn.net/u012551350/article/details/52026740

欢迎加入478720016群来帮助更多的人。

wrecyclerview's People

Contributors

hpwens avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.