e587. Filling Basic Shapes
There are two ways to fill basic shapes like lines and rectangles. The first is to use specific drawing methods like Graphics.fillOval(). This example uses these methods. The second is to construct a shape and then use Graphics2D.fill() to fill the shape. See the java.awt.geom package for examples that create shapes.
g2d.fillArc(x, y, w, h, startAngle, arcAngle);
g2d.fillOval(x, y, w, h);
g2d.fillRect(x, y, w, h);
g2d.fillRoundRect(x, y, w, h, arcWidth, arcHeight); Polygon polygon = new Polygon();
polygon.addPoint(x, y);
// ...continue adding points
g2d.fillPolygon(polygon);
| Related Examples |
e587. Filling Basic Shapes的更多相关文章
- rviz学习笔记(一)——Markers: Sending Basic Shapes (C++) 发送基础形状
一.创建一个包——进行marker练习 1.创建ROS工作空间和包 mkdir -p ~/catkin_ws/src #创建工作空间目录 #创建ROS数据包 catkin_create_pkg usi ...
- e586. Drawing Simple Shapes
There are two ways to draw basic shapes like circles, ovals, lines, arcs, squares, rectangles, round ...
- Computer Graphics Research Software
Computer Graphics Research Software Helping you avoid re-inventing the wheel since 2009! Last update ...
- CG&CAD resource
Computational Geometry The Geometry Center (UIUC) Computational Geometry Pages (UIUC) Geometry in Ac ...
- Gazebo機器人仿真學習探索筆記(三)機器人模型
gazebo_models:https://bitbucket.org/osrf/gazebo_models 模型庫下載,可以參考如下命令: ~/Rob_Soft/Gazebo7$ hg clone ...
- <转>卷积神经网络是如何学习到平移不变的特征
After some thought, I do not believe that pooling operations are responsible for the translation inv ...
- [转]"Windows Phone 7程序设计”完全版电子书可以免费下载了
本文转自:http://www.cnblogs.com/salam/archive/2010/10/29/1864246.html 现在学习Windows Phone 7开发资料十分有限,除了MSDN ...
- CSS绘制简单图形
究竟该用字体图标.图片图标.还是CSS画一个图标?我也不知道.各有千秋吧.本文将介绍如何用css绘制简单的图形,所有测试在chrome58.0完成,如果你不能得到正确结果请到caniuse查一查看看是 ...
- geoserver 图层样式
1.Styled Layer Descriptor 标准描述了稳当的结构合使用规则.一个文档包含了符号定义和绘制规则,那么这个文档就叫做Styled Layer Desciptor(SLD)样式,它是 ...
随机推荐
- python virtualenv使用
1.什么是virtualenv virtualenv用来做环境隔离,比如项目A使用了python2,项目B使用了python3 使用virtualenv可以分别生成项目A和项目B的环境包 2.virt ...
- 【转】(八)unity4.6Ugui中文教程文档-------概要-UGUI Rich Text
原创至上,移步请戳:(八)unity4.6Ugui中文教程文档-------概要-UGUI Rich Text 7.Rich Text UI元素和文本网格的文本可以合并多个字体样式和大小.对 UI系统 ...
- zookeeper的原理讲解
留着以后看:http://blog.csdn.net/u010311445/article/category/1677839
- Asp.Net MVC分页PageList
1.mvc网站右键->管理nuget程序包->安装下边两个组件 2.controller public dbModel db = new dbModel(); public ActionR ...
- html5的拖拽dragAPI(如果看了API不懂,看看那三个案例就会恍然大悟)
1.拖拽和释放定义: 拖拽:Drag; 释放:Drop; 2.源对象和目标对象: 3.相关API: ondragstart:源对象开始被拖动 ondrag:源对象被拖动的过程中 ondragend:源 ...
- tf.square
tf.square square( x, name=None ) 功能说明: 计算张量对应元素平方 参数列表: 参数名 必选 类型 说明 x 是 张量 是 half, float32, float64 ...
- Eval与DataBinder.Eval的区别
DataBinder.Eval的基本格式 DataBinder.Eval(Container.DataItem,"XXX","{0}") <%# Data ...
- 【微信小程序】tabBar的显示问题
tabBar不显示 在app.json中配置了4个页面,在tabBar的list中随意写了两个页面,编译后发现不能显示tabBar. { "pages": [ "page ...
- WPF System.InvalidCastException: 无法将类型为“System.Windows.Media.Color”的对象强制转换为类型“System.Windows.Media.Brush”。
场景:添加ComboBox样式,界面卡死,日志异常文件如下: -- ::, | ERROR | System.InvalidCastException: 无法将类型为“System.Windows.M ...
- 通过shell脚本来rerun一个oozie调度失败的job,从而可以跳过执行失败的节点
标题很长:通过shell脚本来rerun一个oozie调度失败的job,从而可以跳过执行失败的节点 不过目前从oozie调度测试的例子来看,oozie本身的retry好像并没有参数可以控制跳过失败的节 ...