一个QImage或QPixmap新建变量时,第一次填充图片时设置的宽高正常(fill),其后的绘制操作(draw)则会在绘制的矩形底边和右边加上painter.pen().width() 在下面代码17行设置端点查看内存可以直观看到只在右边和底边++ ...
分类:
其他好文 时间:
2016-09-29 18:11:37
阅读次数:
154
需求:将某一部分布局转化为图片 其实很简单,就几行代码 还有一种方法是直接调用View.draw,以后再完善 ...
分类:
其他好文 时间:
2016-09-29 01:26:33
阅读次数:
114
vector<VP> selectShapeCircularity(Mat src,Mat& draw,vector<VP> contours,float minvalue,float maxvalue){ vector<VP> result_contours; draw = Mat::zeros( ...
分类:
其他好文 时间:
2016-09-26 00:43:21
阅读次数:
142
//根据轮廓的面积大小进行选择 vector selectShapeArea(Mat src,Mat& draw,vector contours,int minvalue,int maxvalue){ vector result_contours; draw = Mat::zeros(src.row... ...
分类:
其他好文 时间:
2016-09-26 00:39:54
阅读次数:
191
网上对自定义View总结的文章都很多,但是自己还是写一篇,好记性不如多敲字! 其实自定义View就是三大流程,onMeasure、onLayout、onDraw。看名字就知道,onMeasure是用来测量,onLayout布局,onDraw进行绘制。 那么何时开始进行View的绘制流程,这就要从Vi ...
分类:
其他好文 时间:
2016-09-25 18:38:32
阅读次数:
233
设计模式---------------简单工厂模式一、题目(Question)使用简单工厂模式设计一个可以创建不同几何形状(如圆形、方形和三角形等)的绘图工具,每个几何图形都要有绘制draw()和擦除erase()两个方法,要求在绘制不支持的几何图形时,提示一个UnsupportedException异常。二、..
分类:
其他好文 时间:
2016-09-24 22:09:06
阅读次数:
468
这种效果由ambient、position、diffuse和specular几种光在其背景贴图上实现。 在RenderToTexture()函数中ProcessHelix()函数为实现弹簧的光线效果,而在Draw()函数中的ProcessHelix()函数为实现弹簧实体。 RenderToTextu ...
分类:
其他好文 时间:
2016-09-24 13:28:00
阅读次数:
266
step 1: Draw a PCB shape and the main component placed in the PCB. The drawing sheet should be in the top view. If the drawing sheet is a 3D file, you ...
分类:
其他好文 时间:
2016-09-23 18:33:15
阅读次数:
221
Python/draw_net.py, 这个文件,就是用来绘制网络模型的。也就是将网络模型由prototxt变成一张图片。 1、安装GraphViz 也可以去官网下载,手动安装 2 、安装pydot 3.编译pycaffe 编译之前可能需要配置makefile.config文件,计算机需要安装ana ...
分类:
其他好文 时间:
2016-09-19 15:57:05
阅读次数:
151
View绘制过程 过程详解 onMeasure() 计算尺寸 onLayout() 为viewGroup类型布局子视图用的。 onDraw() 执行绘制图形动作。 View事件传递 Touch事件封装在MotionEvent对象中,其中包括touch的位置、时间、历史记录以及第几个手指触摸(多点触摸 ...
分类:
其他好文 时间:
2016-09-18 14:52:42
阅读次数:
140