在使用Unity中GUI组件时,我们可以像处理一个实体一样,对其进行位移、缩放和旋转的操作。其中,位移和缩放都只需要改变其Rect的内容即可,前者改变x、y参数,后者改变width和height参数,而旋转则有所不同,它需要使用GUI.matrix的一个函数:GUIUtility.RotateAroundPivot (rotAngle, pivotPoint)
参数说明:
rotAngle:旋转...
分类:
编程语言 时间:
2015-04-01 01:54:47
阅读次数:
210
用于mask遮罩效果的图片配合resizableImage使用效果:作为素材用的图片:源码://// ViewController.m// Rect//// Created by YouXianMing on 15/3/29.// Copyright (c) 2015年 YouXianMin...
分类:
其他好文 时间:
2015-03-30 22:39:59
阅读次数:
115
13862. Empty Stalls
Constraints
Time Limit: 2 secs, Memory Limit: 64 MB
Description
Farmer John's new barn consists of a huge circle of N stalls (2
At the end of each day, FJ's c...
分类:
其他好文 时间:
2015-03-30 09:30:44
阅读次数:
125
获取状态栏的尺寸
CGRect rect;
rect=[[UIApplication sharedApplication]statusBarFrame];
获取屏幕尺寸
CGRect rect;
rect=[[UIScreen mainScreen]bounds];
CGSize size=rect.size;
CGFloat width=size.w...
分类:
其他好文 时间:
2015-03-30 09:29:48
阅读次数:
101
来我们看看这个像温度计的控件, 比如音量面板声音大小的控制.它是一个组合型控件由多个Image 和一个Slider组合而成 它的核心是Slider组件实现的. 简单介绍下Slider组件的属性: Fill Rect 填充区域(就是红色背景图片) Handle Rect 把手(白色圆图,你可以任意替换...
分类:
其他好文 时间:
2015-03-29 23:42:44
阅读次数:
160
滚动视图是常用的UI控件之一,它是由多个基本控件组合而成.如图 ================================================================================== 两个必备控件简单介绍: Scroll Rect控件: Horizont...
分类:
其他好文 时间:
2015-03-29 23:33:29
阅读次数:
314
Cocos2d-x之绘制矩形自定义的方法Rect.h 1 // 2 // Rect.h 3 // L01DrawingAPI 4 // 5 // Created by Mac OS 10.9.3 on 15-3-29. 6 // 7 // 8 9 #ifndef __L01DrawingAP...
分类:
其他好文 时间:
2015-03-29 16:18:31
阅读次数:
87
1 - (void)drawRect:(CGRect)rect 2 { 3 NSString *longText = @"CoreText"; /* ... */ 4 NSRange rang =[self.hightString rangeOfString:longText]; ...
分类:
其他好文 时间:
2015-03-28 16:56:08
阅读次数:
149
Because of the huge population of China, public transportation is very important. Bus is an important transportation method in traditional public transportation system. And it’s still playing an important role even now.
The bus system of City X is quite st...
分类:
编程语言 时间:
2015-03-28 10:09:31
阅读次数:
201
------- android培训、java培训、期待与您交流! ----------1.NSRange:(范围) 2.NSPoint\CGPoint(NSPoint相当于CGPoint):(位置:X、Y)设置Point的两种方式:1.NSPoint point = NSMakePoint(100,...
分类:
其他好文 时间:
2015-03-22 00:25:20
阅读次数:
184