最近在工作中遇到了一些问题,总结下来就是Android中Rect这个类造成的。不得不说,不知道Android SDK的开发人员是怎么想的, 这个类设计的太奇葩了。首先介绍一下Rect类:Rect类主要用于表示坐标系中的一块矩形区域,并可以对其做一些简单操作。这块矩形区域,需要用左上右下两个坐标点表示...
分类:
移动开发 时间:
2014-09-26 20:32:38
阅读次数:
184
搭建mysql主从服务器://注:注释掉my.cn文件中的skip-federated字段[root@localhost]#/bin/cp-r/usr/local/mysql/share/mysql/my-huge.cnf/etc/my.cnf配置主服务器:修改my.cnf文件server-id=1//每个数据库服务器都要指定唯一一个server-idlog-bin=mysql-bin//mysql进行主从复..
分类:
数据库 时间:
2014-09-26 01:20:09
阅读次数:
327
@interface ShowLineView : UIView
-(void)drawRect:(CGRect)rect{
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetLineCap(context, kCGLineCapSquare);//设置线条样式
CGC...
分类:
移动开发 时间:
2014-09-24 20:16:57
阅读次数:
358
var rect = $('.CalendarColumn').get(0).getBoundingClientRect();$('.CalendarColumn').get(0).getBoundingClientRect()ClientRect {height: 73, width: 191, ...
分类:
其他好文 时间:
2014-09-24 19:25:07
阅读次数:
176
1、创建一个drawboard#import "DrawBoard1.h"@implementation DrawBoard1-(void)drawRect:(CGRect)rect{ CGContextRef context=UIGraphicsGetCurrentContext(); CGC.....
分类:
其他好文 时间:
2014-09-23 01:29:23
阅读次数:
360
1.创建窗口 1 //声明窗口位置大小 2 private Rect pos = new Rect(10,60,120,50); 3 4 //回调函数 5 void Wincallback(int id) 6 { 7 if(GUI.Button(ne...
分类:
其他好文 时间:
2014-09-23 01:08:13
阅读次数:
404
1.文本输入框 1 public string text; 2 3 void OnGUI(){ 4 text = GUI.TextField(new Rect(140, 140, 100, 40), text); 5 6 if (GUI.Button(ne...
分类:
其他好文 时间:
2014-09-23 00:56:33
阅读次数:
327
- (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextMoveToPoint(context, 0, 0); CGContextAddRect(c...
分类:
其他好文 时间:
2014-09-23 00:52:13
阅读次数:
223
- (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); //起点移动到(0,0) CGContextMoveToPoint(context, 0, 0); //画线到(100,...
分类:
其他好文 时间:
2014-09-22 22:22:23
阅读次数:
208
/** * 将UIColor变换为UIImage * **/+ (UIImage *)createImageWithColor:(UIColor *)color{ CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f); UIGraphicsBe...
分类:
移动开发 时间:
2014-09-22 20:45:23
阅读次数:
198