名词解释: Shape : 矢量图形,点线面之类的; Hit Testing : 点击测试;参考内容:
A Gentle Introduction to Making HTML5 Canvas Interactive 小记:
在Html5中使用Canvas对象来绘制矢量图形Shape,我们...
分类:
Web程序 时间:
2014-05-26 23:15:29
阅读次数:
305
package com.storm.ui;import
android.content.Context;import android.graphics.Bitmap;import
android.graphics.Canvas;import android.graphics.Color;import...
分类:
其他好文 时间:
2014-05-24 14:07:05
阅读次数:
199
上一篇讲到用canvas进行绘制得到对应最终的bitmap.
在实际应用中,我们除了给图标添加数字外,也有可能加一些红色方块之类的图标作为新功能的提醒.那么有没有什么方法,很方便地给图标添加提醒icon或者数字呢?
有的,还是得借助于开源项目ViewBadger,这个是github上的地址:http...
分类:
移动开发 时间:
2014-05-23 09:31:59
阅读次数:
426
在我们开发一些如通讯录、社交等应用或者应用添加新功能模块时,会考虑在对应的图标上加上未读信息的数量,或者是新功能提醒的图标,这样不占太大空间还能达到提示的目的.
之前在MMS分析部分,也有人问过我这种提醒的实现. 关于这种提醒的添加,我总结了下,有大概几种方法可以实现:1. 在对应的布局放置Text...
分类:
移动开发 时间:
2014-05-23 09:12:27
阅读次数:
268
package com.example.ceshi;import
android.content.Context;import android.graphics.Canvas;import
android.graphics.Color;import android.graphics.Paint;im...
分类:
其他好文 时间:
2014-05-22 01:59:09
阅读次数:
288
Node-Canvas 安装的时候,并没想到有如此多的坑。看来npm也不是万能的。canvas需要cario,而cario需要libpng,又需要pixman,同时pkg-config更是前提,官网提供的pkg-config版本又在Mac OS 10.9 上有问题。本文将对node-canvas安装提供简要的讲解和坑的填充。...
分类:
其他好文 时间:
2014-05-21 14:44:48
阅读次数:
1937
今天是个好日子,2014年5月20日,表白的最佳时机,虽说孩子已经四岁、结婚已经五年,但是也不可以偷懒,于是有了这个效果,在线研究点这里,下载收藏点这里。
程序猿and程序媛,大胆秀出你的爱吧。...
分类:
Web程序 时间:
2014-05-21 08:37:55
阅读次数:
439
一张图上分布着n台坏了的电脑,并知道它们的坐标。两台修好的电脑如果距离
#include
#include
#include
#include
#include
#include
const int MAXN=111111;
const int MAX_N=111111;
int n,d;
using namespace std;
struct po
{
int x,y;
boo...
分类:
Web程序 时间:
2014-05-21 06:29:47
阅读次数:
418
Doughnut Chartvar
c=document.getElementById("canvas");var ctx=c.getContext("2d");ctx.font="50px
sans-serif";ctx.fillText("75%",40,92);//ctx.clearRect(...
分类:
其他好文 时间:
2014-05-20 13:05:39
阅读次数:
302
Doughnut Chartvar
c=document.getElementById("canvas");var ctx=c.getContext("2d");ctx.font="50px
sans-serif";ctx.fillText("75%",40,92);
分类:
其他好文 时间:
2014-05-20 12:37:13
阅读次数:
184