小米手机哪个拍照好最好

 上传我的文档
 下载
 收藏
该文档贡献者很忙,什么也没留下。
 下载此文档
正在努力加载中...
《计算机图形学》模拟考试题
下载积分:840
内容提示:《计算机图形学》模拟考试题
文档格式:DOC|
浏览次数:3|
上传日期: 15:21:14|
文档星级:
全文阅读已结束,如果下载本文需要使用
 840 积分
下载此文档
该用户还上传了这些文档
《计算机图形学》模拟考试题
官方公共微信ArcGIS 9.0 绘制扇形
 作者: ITPUB论坛 编辑:
【IT168技术文档】
IFeatureClass featureClass =GetLayerByName("摄像头").FeatureC
IFeature featureForD
IFeatureCursor tmpcur =Base.QueryElement(featureClass,"");
while(true)
featureForDraw = tmpcur.NextFeature();
//得到对象
if(featureForDraw!=null)
ISimpleFillSymbol
pointSymbol = new SimpleFillSymbolClass();
pointSymbol.Style = ESRI.ArcGIS.Display.esriSimpleFillStyle.esriSFSN
pointSymbol.Color = Base.GetRGBColor(<span style="COLOR: #5,<span style="COLOR: #,<span style="COLOR: #);
ILineSymbol linesymbol=new SimpleLineSymbolClass();
linesymbol.Width=<span style="COLOR: #.1;
linesymbol.Color=Base.GetRGBColor(<span style="COLOR: #5,<span style="COLOR: #,<span style="COLOR: #);
pointSymbol.Outline=
IPoint p=featureForDraw.ShapeCopy as IP
//这里用了属性查询,用到前面得到的对象的主字段值。
//IRubberBand pRubberBand=new
RubberCircleClass();
ESRI.ArcGIS.Geometry.IConstructCircularArc con=new CircularArcClass();
double FW=<span style="COLOR: #.0;
zj=<span style="COLOR: #.01; //直径
jd=<span style="COLOR: #.414;
string _fw=featureForDraw.get_Value(featureForDraw.Fields.FindField("SP_ANGLE")).ToString().Trim();
if(_fw!=string.Empty)
FW=double.Parse(_fw);
_zj=featureForDraw.get_Value(featureForDraw.Fields.FindField("BOUND")).ToString().Trim();
if(_zj!=string.Empty)
zj=double.Parse(_zj);
//con.ConstructCircle(p,System.Convert.ToDouble(bound_str)/2000,false);
ESRI.ArcGIS.Geometry.ICircularArc cir=new CircularArcClass();
cir=con as ICircularA
cir.PutCoordsByAngle(p,FW*Math.PI/<span style="COLOR: #0,<span style="COLOR: #*Math.PI/<span style="COLOR: #0,zj);
IPoint 起始点=cir.FromP
IPoint 结束点=cir.ToP
ILine line=new LineClass();
ILine line1=new LineClass();
line.PutCoords(p,起始点);
line1.PutCoords(结束点,p);
ISegmentCollection
= new PolygonClass();
object Missing
polygon.AddSegment(line as ISegment,ref Missing,ref Missing);
polygon.AddSegment(cir as ISegment,ref Missing,ref Missing);
polygon.AddSegment(line1 as ISegment,ref Missing,ref Missing);
IGeometry geometry
=polygon as IG
object tmpSymbol=(object)pointS
axMapControl1.DrawShape (geometry,ref tmpSymbol);
catch(Exception ex)
System.Console.WriteLine(ex.Message);
大学生分期购物销量榜
已有条评论
IT168企业级Away3D线条的绘制的例子-flex-flash教程-壹聚教程网Away3D线条的绘制的例子
下面我们来看一个关于Away3D线条的绘制的例子,希望这个例子能够给各位同学带来帮助,具体的细节如下所示.
1,使用LineSegment创建线段
(1)可以设置线条的开始坐标,结束坐标,起始颜色,结束颜色,线条粗细等
(2)将创建好的一系列线条添加到SegmentSet,最后将SegmentSet添加到View3D里。
2,效果图如下:
代码如下所示
&&&&import flash.display.S
&&&&import flash.display.StageA
&&&&import flash.display.StageScaleM
&&&&import flash.events.E
&&&&import flash.events.MouseE
&&&&import flash.geom.Vector3D;
&&&&import away3d.containers.View3D;
&&&&import away3d.controllers.HoverC
&&&&import away3d.entities.M
&&&&import away3d.entities.SegmentS
&&&&import away3d.materials.TextureM
&&&&import away3d.primitives.CubeG
&&&&import away3d.primitives.LineS
&&&&import away3d.utils.C
&&&&[SWF(frameRate=&60&, backgroundColor=&#FFFFFF&)]
&&&&public class S3 extends Sprite {
&&&&&&&&private& var _view3D:View3D;
&&&&&&&&private var cameraController:HoverC//360全景展示相机控制器
&&&&&&&&//地板图片(用作地板的纹理 )
&&&&&&&&[Embed(source=&assets/road.jpg&)]
&&&&&&&&private var floorClass:C
&&&&&&&&//地板材质
&&&&&&&&private var floorMaterial:TextureM
&&&&&&&&private var lastPanAngle:N
&&&&&&&&private var lastTiltAngle:N
&&&&&&&&private var lastMouseX:N
&&&&&&&&private var lastMouseY:N
&&&&&&&&private var move:B
&&&&&&&&public function S3() {
&&&&&&&&&&&&initEngine();
&&&&&&&&&&&&initMaterials();
&&&&&&&&&&&&initObjects();
&&&&&&&&&&&&initListeners();
&&&&&&&&/**
&&&&&&&&&* 初始化引擎
&&&&&&&&&*/
&&&&&&&&private function initEngine():void
&&&&&&&&&&&&stage.scaleMode = StageScaleMode.NO_SCALE;
&&&&&&&&&&&&stage.align = StageAlign.TOP_LEFT;
&&&&&&&&&&&&&
&&&&&&&&&&&&// 创建一个视口
&&&&&&&&&&&&_view3D = new View3D();
&&&&&&&&&&&&_view3D.antiAlias = 4; //设置抗锯齿级别
&&&&&&&&&&&&&
&&&&&&&&&&&&//初始化摄像头
&&&&&&&&&&&&cameraController = new HoverController(_view3D.camera);
&&&&&&&&&&&&/*cameraController.distance = 1000;
&&&&&&&&&&&&cameraController.minTiltAngle = 0;
&&&&&&&&&&&&cameraController.maxTiltAngle = 90;
&&&&&&&&&&&&cameraController.panAngle = 45;*/
&&&&&&&&&&&&cameraController.tiltAngle = 15;
&&&&&&&&&&&&&
&&&&&&&&&&&&addChild(_view3D);
&&&&&&&&/**
&&&&&&&&&* 初始化材质
&&&&&&&&&*/
&&&&&&&&private function initMaterials():void
&&&&&&&&&&&&//地板的纹理
&&&&&&&&&&&&floorMaterial = new TextureMaterial(Cast.bitmapTexture(floorClass));
&&&&&&&&/**
&&&&&&&&&* 初始化物体
&&&&&&&&&*/
&&&&&&&&private function initObjects():void
&&&&&&&&&&&&// 在三维舞台中创建一个方块(地板 )
&&&&&&&&&&&&var cube1:Mesh = new Mesh(new CubeGeometry(700, 20, 500), floorMaterial);
&&&&&&&&&&&&_view3D.scene.addChild(cube1);
&&&&&&&&&&&&&
&&&&&&&&&&&&//创建线条
&&&&&&&&&&&&var linesContainer:SegmentSet = new SegmentSet();
&&&&&&&&&&&&//线的两端点,粗细,起始端颜色,结束端颜色
&&&&&&&&&&&&var line:LineSegment = new LineSegment(new Vector3D(0,0,0),new Vector3D(200,200,200),
&&&&&&&&&&&&&&&&0xFFFF00,1);
&&&&&&&&&&&&linesContainer.addSegment(line);
&&&&&&&&&&&&_view3D.scene.addChild(linesContainer);
&&&&&&&&/**
&&&&&&&&&* 初始化监听
&&&&&&&&&*/
&&&&&&&&private function initListeners():void
&&&&&&&&&&&&addEventListener(Event.ENTER_FRAME, _onEnterFrame);
&&&&&&&&&&&&//鼠标事件监听
&&&&&&&&&&&&stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
&&&&&&&&&&&&stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
&&&&&&&&&&&&stage.addEventListener(MouseEvent.MOUSE_WHEEL,onWheel);
&&&&&&&&&&&&stage.addEventListener(Event.RESIZE, onResize);
&&&&&&&&&&&&onResize();
&&&&&&&&/**
&&&&&&&&&* 渲染视图
&&&&&&&&&*/
&&&&&&&&private function _onEnterFrame(e:Event):void
&&&&&&&&&&&&&
&&&&&&&&&&&&//移动视角
&&&&&&&&&&&&if (move) {
&&&&&&&&&&&&&&&&cameraController.panAngle = 0.3 * (stage.mouseX - lastMouseX) + lastPanA
&&&&&&&&&&&&&&&&cameraController.tiltAngle = 0.3 * (stage.mouseY - lastMouseY) + lastTiltA
&&&&&&&&&&&&}
&&&&&&&&&&&&//渲染视图
&&&&&&&&&&&&_view3D.render();
&&&&&&&&/**
&&&&&&&&&* 使用舞台大小一直全屏
&&&&&&&&&*/
&&&&&&&&private function onResize(event:Event = null):void
&&&&&&&&&&&&_view3D.width = stage.stageW
&&&&&&&&&&&&_view3D.height = stage.stageH
&&&&&&&&/**
&&&&&&&&&* 鼠标滚轮事件
&&&&&&&&&*/
&&&&&&&&private function onWheel(e:MouseEvent):void
&&&&&&&&&&&&if(e.delta & 0){
&&&&&&&&&&&&&&&&if(cameraController.distance & 1000)
&&&&&&&&&&&&&&&&&&&&cameraController.distance += 100;
&&&&&&&&&&&&}else{
&&&&&&&&&&&&&&&&if(cameraController.distance & 600)
&&&&&&&&&&&&&&&&&&&&cameraController.distance -= 100;
&&&&&&&&&&&&}
&&&&&&&&/**
&&&&&&&&&* 鼠标按下事件
&&&&&&&&&*/
&&&&&&&&private function onMouseDown(event:MouseEvent):void
&&&&&&&&&&&&lastPanAngle = cameraController.panA
&&&&&&&&&&&&lastTiltAngle = cameraController.tiltA
&&&&&&&&&&&&lastMouseX = stage.mouseX;
&&&&&&&&&&&&lastMouseY = stage.mouseY;
&&&&&&&&&&&&move =
&&&&&&&&/**
&&&&&&&&&* 鼠标弹起事件
&&&&&&&&&*/
&&&&&&&&private function onMouseUp(event:MouseEvent):void
&&&&&&&&&&&&move =
上一页: &&&&&下一页:相关内容iphone画圆弧或扇形 - stephen830 - ITeye博客
博客分类:
iphone画圆弧或扇形
核心函数:
CGContextAddArc
Adds an arc of a circle to the current path, possibly preceded by a straight line segment
void CGContextAddArc (
CGContextRef c, //图形上下文
CGFloat x,//圆心x坐标
CGFloat y,//圆心y坐标
CGFloat radius,//圆半径
CGFloat startAngle,//开始的弧度
CGFloat endAngle,//结束的弧度
int clockwise //画的方向(1=顺时针,0=逆时针)
关于角度与弧度的转换关系代码:
#define PI 3.
static inline float radians(double degrees) { return degrees * PI / 180; }
示例代码:
//设置矩形填充颜色:红色
CGContextSetRGBFillColor(context, 1.0, 0.0, 0.0, 1.0);
//设置画笔颜色:黑色
CGContextSetRGBStrokeColor(context, 0, 0, 0, 1);
//设置画笔线条粗细
CGContextSetLineWidth(context, 0.6);
//扇形参数
double radius=40;//半径
int startX=50;//圆心x坐标
int startY=50;//圆心y坐标
double pieStart=0;//起始的角度
double pieCapacity=60;//角度增量值
int clockwise=0;//0=逆时针,1=顺时针
//逆时针画扇形
CGContextMoveToPoint(context, startX, startY);
CGContextAddArc(context, startX, startY, radius, radians(pieStart), radians(pieStart+pieCapacity), clockwise);
CGContextClosePath(context);
CGContextDrawPath(context, kCGPathEOFillStroke);
//扇形参数
startX=150;//圆心x坐标
startY=50;//圆心y坐标
pieStart=0;//起始的角度
pieCapacity=60;//角度增量值
clockwise=1;//0=逆时针,1=顺时针
//顺时针画扇形
CGContextMoveToPoint(context, startX, startY);
CGContextAddArc(context, startX, startY, radius, radians(pieStart), radians(pieStart+pieCapacity), clockwise);
CGContextClosePath(context);
CGContextDrawPath(context, kCGPathEOFillStroke);
(1)为逆时针画扇形:角度0°-60°
(2)为顺时针画扇形:角度0°-60°
关于角度的定义:(参见下图)
红点为圆心,圆心右边绿线表示的角度为0°,往下绕红心顺时针开始依次为1°、2°、3°、...、360°。
stephen830
浏览: 1845054 次
来自: 上海
使用Netty进行Android与Server端通信实现文字发 ...
非常感谢,正好用上
提示的/222.177.4.242
无法链接到ip地址,是什 ...

我要回帖

更多关于 小米哪个拍照最好看 的文章

 

随机推荐