//获取当前屏幕的并且保存图片LRESULT CFeetScanView::SaveViewBMP(WPARAM wParam, LPARAM lParam){ CRect rect; this->GetClientRect(&rect); rect.left = 20; r...
分类:
编程语言 时间:
2015-07-16 18:16:28
阅读次数:
151
先来看个效果:
新建视图类,在直接添加代码:
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{...
分类:
移动开发 时间:
2015-07-15 19:21:46
阅读次数:
113
-?(UIImage?*)createImageWithColor:(UIColor?*)color
{
????CGRect?rect?=?CGRectMake(0.0f,?0.0f,?1.0f,?1.0f);
????UIGraphicsBeginImageContext(rect.size);
????CGContextRef?context...
分类:
其他好文 时间:
2015-07-15 17:14:45
阅读次数:
114
CGRect rect = [[UIApplication
sharedApplication] statusBarFrame];
状态栏的高度:
float status height = rect.size.height;
导航栏的高度:
float navigationheight = self.navigationController.navigationBar.frame.s...
分类:
移动开发 时间:
2015-07-15 17:08:21
阅读次数:
444
- (void)drawRect:(CGRect)rect { CGFloat lineWidth = 2; CGRect borderRect = CGRectMake(self.frame.size.width/2, self.frame.size.height - 20, 10....
步骤一:
为UIImage类添加静态方法:
extension UIImage {
static func imageWithColor(color: UIColor) -> UIImage {
let rect = CGRect(x: 0, y: 0, width: 1, height: 1)
UIGraphicsBegin...
分类:
其他好文 时间:
2015-07-13 20:40:36
阅读次数:
242
案例代码#include LRESULT CALLBACK WndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ HDC hdc; PAINTSTRUCT ps; RECT rect; switch(mess...
分类:
其他好文 时间:
2015-07-13 16:01:37
阅读次数:
117
类CRect是对Windows结构RECT的封装,凡是能用RECT结构的地方都可以用CRect代替。结构RECT表示一个矩形的位置和尺寸,其定义为:typedef struct tagRECT{LONG left;LONG top;LONG right;LONG bottom;} RECT;其中 l...
分类:
其他好文 时间:
2015-07-12 20:09:27
阅读次数:
103
一:访问修饰符:1.省略访问修饰符具有默认的访问特性,即具有包访问特性,只能被同一个包中的类使用。2.public访问修饰符用于说明类和类的成员的访问权限。这种类叫公有类。在一个文件中只能有一个public类型的类。例如:Rect和UseImport两个类,分别在两个不同的包中。顺便回顾一下不同类要...
分类:
编程语言 时间:
2015-07-12 00:16:28
阅读次数:
181
Red and Black
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 12211 Accepted Submission(s): 7601
Problem Description
There is a rect...
分类:
其他好文 时间:
2015-07-11 09:16:35
阅读次数:
160