...
转载 2021-08-13 14:51:00
229阅读
2评论
<script> var canvas = document.getElementById('canvas'); var ctxt = canvas.getContext('2d'); var w = canvas.width; var h = canvas.height; //外圆 ctxt.be
转载 2016-06-13 19:21:00
102阅读
2评论
关于canvas绘图模糊问题及解决办法
转载 2016-07-06 14:51:00
147阅读
2评论
 <script type="text/javascript"> function bin2hex(s) { var i, l, o = "", n; s += ""; for (i = 0, l = s.length; i < l; i++) { n = s.charCodeAt(i).toString(16
转载 2022-07-10 00:12:00
212阅读
import java.time.*; public class MyTest{ public static void main(String[] args){ LocalDate date = LocalDate.now(); int month = date.getMonthValue(); i
转载 2016-12-12 22:55:00
185阅读
2评论
作为Java开发者我们都遇到过java.lang.NoSuchMethodError错误,究其根源,是JVM的“双亲委托模型”引发的问题。如果在类路径下放置了多个不同版本的类包,如commons-lang2.x.jar 和 commons-lang4.x.jar 都位于类路径中,代码中用到了commons-lang4.x类的某个方法,而这个方法在commons-lang2.x.jar中并不存在,J
转载 2023-07-03 11:51:36
271阅读
方法 System.out.println(): 系统的一个类(类似自己写的HelloWorld)+System下的一个输出对象 +一个方法(println())。调用系统类里面的标准输出对象out中的println()方法。 Java方法是语句的集合,它们在一起执行一个功能。 方法是解决一类问题的 ...
转载 2021-05-21 00:23:00
220阅读
2评论
Canvascanvas最早由Apple引入WebKit,用于MacOSX的Dashboard,后来又在Safari和GoogleChrome被实现。基于Gecko1.8的浏览器,比如Firefox1.5,同样支持这个元素。<canvas>元素是WhatWGWebapplications1.0规范的一部分,也包含于HTML5中。canvas因为是html5引入的,存在兼容性问题体验Ca
原创 2019-02-20 10:34:16
1069阅读
1点赞
1. canvas标签上的width/height和css样式上的width/height 默认是300*150 标签上的width和height是用于绘制逻辑画布尺寸的,和CSS属性的style.height和style.width是不同的。如果不设置 CSS 属性,画布的固有大小将用作为其显示大 ...
转载 2021-09-10 11:10:00
151阅读
2评论
绘制VIew本身的内容,通过调用View.onDraw(canvas)函数实现绘制自己的孩子
原创 2022-09-11 01:24:22
186阅读
工作中用到了Thread,一开始用错了,仔细研究了一下,稍作整理。 前言,今天写代码居然这样写的new Thread() { @Override public void run() { System.out.println("test"); } }.run(); 天真得以为这样这样会新开启一个线程执行,可是打印了线程的信息之后,发现还是在主线程中
转载 2013-06-27 19:52:00
99阅读
2评论
 今天花了两个小时把一份关于什么是Native Method的英文文章好好了读了一遍,以下是我依据原文的理解。一. 什么是Native Method   简单地讲,一个Native Method就是一个java调用非java代码的接口。一个Native Method是这样一个java的方法:该方法的实现由非java语言实现,比如C。这个特征并非java所特有,很多其它
转载 2023-09-03 17:37:00
63阅读
canvas利用canvas创建一个画布一个画布在网页中是一个矩形框,通过 <canvas> 元素来绘制.默认情况下 <canvas> 元素没有边框和内容。<canvas>的简单实例如下:<canvas id="myCanvas" width="200" height="100"></canvas>以上代码创建了一个200*100像素的矩
转载 2021-02-08 20:06:47
161阅读
2评论
1)实心矩形。 ctx.fillStyle = 'rgb(0,255,0)'; ctx.fillRect(10,20,50,50); // x,y,width,height 2)空心矩形。 ctx.strokeStyle = 'rgb(0,182,0)'; ctx.lineWidth = 5; ctx.strokeRect(9,19,52,52); 3)线性渐变。 gradient = c
转载 2010-11-20 21:16:00
161阅读
2评论
context.lineWidth = 0.5incorrect display lineWidth=1 at html5 canvascanvas.save() canvas.restore() 作用HTML5 canvas clip() 方法
转载 2014-11-25 14:34:00
116阅读
2评论
        通过method_exchangeImplementation、class_replaceMethod、method_setImplementation进行Method Swizzling时,对originalMethod和destMethod的要求如下:(1)返回值类型可以不同。如:- (v
原创 2015-10-09 12:39:07
617阅读
工作中用到了Thread,一开始用错了,仔细研究了一下,稍作整理。前言,今天写
原创 2022-09-05 17:02:48
56阅读
Python中 staticmethod 和 classmethod 的区别在Python 中,有 @staticmethod、@classmethod装饰器和self、cls参数。初学时,确实不容易搞清楚。 Python中3种方式定义类方法:1、常规方式;2、@classmethod修饰方式;3、@staticmethod修饰方式。 其中:@staticmethod:静态方法装饰器;@class
一、Canvas事件绑定说明 canvas元素和CanvasRenderingContext2D 上下文对象,处理的是位图、像素数据,只有一个标签。 所有的交互,判断处理都是针对cavans标签的。 对于交互性要求比较高的应用场景推荐使用svg矢量图模式。 canvas交互逻辑需要自己编码处理,当点
转载 2020-11-07 14:00:00
830阅读
2评论
Canvas is great for high performance graphics rendering but by default the results look blocky on phones tablets and laptops with high pixel density o
转载 2016-08-22 02:22:00
170阅读
2评论
  • 1
  • 2
  • 3
  • 4
  • 5