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

Stargazers

54yangli avatar  avatar  avatar 明月来相照 avatar 薛志辉 avatar  avatar  avatar  avatar kris avatar tzraeq avatar  avatar  avatar fundroid avatar yuchen931201 avatar  avatar zsruning avatar  avatar prookie avatar 尹秀成 avatar  avatar  avatar  avatar  avatar ddy233 avatar Winsy avatar Hongyu Dong avatar  avatar peng.lv avatar JinzLin avatar mundane avatar  avatar maiduoduo avatar  avatar  avatar  avatar  avatar lili avatar  avatar  avatar weileng avatar android-auto-update avatar Jusenr avatar  avatar Grandaunt avatar alina avatar  avatar nochange_ avatar  avatar  avatar  avatar  avatar Jeby Sun avatar ldw_wow avatar  avatar  avatar Pranav Lathigara avatar 钢笔布莱恩特 avatar  avatar 苏坡坡要吃婆婆酥 avatar  avatar  avatar Jun avatar LosSanese avatar xchechi123x avatar ErnestChang avatar JaydenZhou avatar  avatar lz avatar  avatar Andy.Zhao avatar Colin avatar

Watchers

James Cloos avatar xchechi123x avatar  avatar  avatar  avatar 钢笔布莱恩特 avatar

wrecyclerview's Issues

为什么会出现Resources$NotFoundException: Resource ID #0xfffffe6c这个异常

大佬您好,我仔细查看源码发现BaseMultiItemQuickAdapter这个类中定义了一个常量TYPE_NOT_FOUND,它的值是-404,转换成16进制就是0xfffffe6c,也就是没有针对这个notFound的type赋值么?网上查询之后显示说是定义了Type但是没有添加布局,可是我只定义了两种type而且都赋值了啊, public static final int TYPE_NORMAL = 100; public static final int TYPE_ADD = 200; addItemType(ServiceSubscribeServiceBean.TYPE_NORMAL,R.layout.item_fuwu_subscribe_item);
addItemType(ServiceSubscribeServiceBean.TYPE_ADD,R.layout.item_fuwu_subscribe_add);
大概这样,希望大神能帮个忙,谢谢

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.