码迷,mamicode.com
首页 >  
搜索关键字:there is a huge rect    ( 5271个结果
【processing】小代码
今天无意间发现的processing 很有兴趣 实现很简洁void setup(){}void draw(){ background(255); if(mouseX height/2) { fill(0); rect(0,height/2,width/2,height/2); ...
分类:其他好文   时间:2014-10-10 23:58:04    阅读次数:456
3-4 计算长方形的周长和面积
3-4 计算长方形的周长和面积 Time Limit: 1000MS Memory limit: 65536K 题目描述 通过本题的练习可以掌握拷贝构造函数的定义和使用方法; 设计一个长方形类Rect,计算长方形的周长与面积。类中有私有数据成员Length(长)、Width(宽),由具有缺省参数值的构造函数对其初始化,函数原型为:Rect(double Length=0...
分类:其他好文   时间:2014-10-09 16:30:58    阅读次数:173
8 quotes that will surely motivate you when you facing huge challenges
8 quotes that will surely motivate you when you facing huge challenges
分类:其他好文   时间:2014-10-09 15:58:43    阅读次数:136
王立平--Unity中的GUI Skin
C#脚本: public class NewBehaviourScript2 : MonoBehaviour { public Texture t; public GUISkin skin; // Use this for initialization void Start () { }  void OnGUI(){ GUILayout.BeginArea(new Rect(0...
分类:其他好文   时间:2014-10-08 12:02:25    阅读次数:201
王立平--GUI与GUILayout的区别
GUI.Button (new Rect(0,0,5,5,"哈哈"); GUILayout.Button ("heheh"); 1.以上代码都是现实一个按钮 2.不同之处: GUI中需要通过new Rect()指定button的位置,不灵活 GUILayout不需要指定位置,会自动确定现实位置,较为灵活。...
分类:其他好文   时间:2014-10-07 19:14:03    阅读次数:185
Android 自定义EditText输入框 带清空按钮
总结 Android 自定义EditText输入框 带清空按钮 当用户输入字符后 EditText会自动在输入框的内部右侧出现删除按钮 重写EditText达到简化布局的效果 效果图: 继承EditText package com.example.myedittexttest; import android.content.Context; import android.graphics.Rect; import android.graphics.drawable.Draw...
分类:移动开发   时间:2014-10-07 12:37:13    阅读次数:293
判断两个矩形相交
假定矩形是用一对点表达的(minx, miny) (maxx, maxy),那么两个矩形rect1{(minx1, miny1)(maxx1, maxy1)}rect2{(minx2, miny2)(maxx2, maxy2)} 相交的结果一定是个矩形,构成这个相交矩形rect{(minx, min...
分类:其他好文   时间:2014-10-01 17:42:11    阅读次数:204
actionscript3.0 的一些小技巧
1. 画空心矩形(其他的空心圆之类的东西也是使用的)rect.beginFill(0,1);rect.drawRect(0,0,480,480);rect.drawRect(3.5,3.5,473,473);rect.endFill();2.try...catch 能不用就不用,这个会影响As3程序...
分类:其他好文   时间:2014-09-29 23:53:21    阅读次数:208
显示图像
底层操作为矩阵定义了一系列方便的操作符。我们可以将一个已经存在的灰度图像img变成全黑色:img = Scalar(0);选择感兴趣区域:Rect r(10, 10, 100, 100);Mat smallImg = img(r);将Mat转为 C API 数据类型:Mat img = imread...
分类:其他好文   时间:2014-09-27 19:20:40    阅读次数:188
Android下获取状态栏的高度
/** * * @param activity * @return > 0 success; <= 0 fail */ public static int getStatusHeight(Activity activity){ int statusHeight = 0; Rect localRect = new Rect(); activity.getWindow().getDecorVie...
分类:移动开发   时间:2014-09-27 18:04:30    阅读次数:230
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!