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 Pycharm连接Ubantu Python环境
由于我习惯在window下开发,但是代码环境布局在Ubantu.使用Python,为了方便程序的调试,尝试在Windows下的Pycharm远程连接到Ubantu虚拟机下的Python环境. 1.准备 ...
- kafka消费者如何才能从头开始消费某个topic的全量数据
消费者要从头开始消费某个topic的全量数据,需要满足2个条件(spring-kafka): (1)使用一个全新的"group.id"(就是之前没有被任何消费者使用过); (2)指 ...
- LeetCode: String to Integer (atoi) 解题报告
String to Integer (atoi) Implement atoi to convert a string to an integer. Hint: Carefully consider ...
- Android开发(九)——ViewFlipper实现图片轮播
图片轮播的实现方法有很多,主要有View.ViewFilpper.ViewFilpper系统自带的一个多页面管理控件,它可以实现子界面的自动切换. 首先 需要为ViewFlipper加入View (1 ...
- RFC 4627 JSON
Network Working Group D. Crockford Request for Comments: 4627 JSON.org Category: Informational July ...
- JAVA-JSP内置对象之out对象
相关资料:<21天学通Java Web开发> out对象1.out对象用来向网页输出信息. 方法 返回值 方法说 ...
- redis过期回调以及键空间通知
背景 最近需要涉及一个定时通知的业务,之前的办法是采用定时任务,每秒查询一次.后来了解到Redis的键空间通知机制,其中的过期通知,和业务非常贴合. 键空间通知 下面是Redis中文文档的介绍 键空间 ...
- Android ListView的使用(一)
初次接触listview,以为直接在Android Studio 中将控件给拖过去,就能够使用了,结果半天显示不了. 后来总算知道原因了. 先上代码: activity_main.xml 显示页面 里 ...
- mongo源码学习(二)db.cpp之mongoDbMain方法分析
mongo后台进程的入口:mongo/src/mongo/db/dbmain.cpp,wmain(for windows)和main函数,main函数也很简单,就是委托给db.cpp中的mongoDb ...
- Android——Activity去除标题栏和状态栏
一.在代码中设置 public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //去 ...