//一个简单的slide 逻辑:var len = $('.huge-benefit-09 ul li').length; var oLiWidth = $('.huge-benefit-09 ul li').css('width'); //需要显示的宽度 ...
分类:
其他好文 时间:
2015-07-16 19:30:43
阅读次数:
133
void ViewReportDlg::CopyScreenToBitmap() { CDC *cdc = this->GetDC(); HDC wnd = cdc->GetSafeHdc(); //CClientDC dc(this); CRect rect; B...
分类:
其他好文 时间:
2015-07-16 18:38:39
阅读次数:
96
//获取当前屏幕的并且保存图片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