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)样式,它是 ...
随机推荐
- Lua语法基础(1)---简介、基本数据类型、表达式
我觉得我已经陷入了一个坑内.因为,安装了Lua和SublimeText3编辑器之后,怎么使自己编写的lua代码在untiy内运行起来,是个我完全不了解的机制.先放一放吧.首先,来回顾一下Lua的语法基 ...
- Flume中的HDFS Sink配置参数说明【转】
转:http://lxw1234.com/archives/2015/10/527.htm 关键字:flume.hdfs.sink.配置参数 Flume中的HDFS Sink应该是非常常用的,其中的配 ...
- 【驱动】MTD子系统分析
MTD介绍 MTD,Memory Technology Device即内存技术设备 字符设备和块设备的区别在于前者只能被顺序读写,后者可以随机访问:同时,两者读写数据的基本单元不同. 字符设备,以字节 ...
- Ant编译android程序
http://blog.csdn.net/xyz_lmn/article/details/7268582 这一篇主要做了创建android项目.update已存在项目.ant编译项目. 一,准备ant ...
- 【转】Python 字典中的中文输出问题
import json dict = {'Title': '这是标题'} print json.dumps(dict, ensure_ascii=False, encoding='UTF-8') #结 ...
- Android Studio preview 不显示,程序运行正常
答案来自 stack flow 修改: res -> values -> style.xml style name="AppTheme" parent="Ba ...
- hdu 4253(经典题目:二分+最小生成树)
题意:就是说有A.B两个公司要修路,有m条路,可能是属于A修的,也可能是属于B修的,现在要求所有路都联通的情况下的最小权值,并且A公司必须要修k条路. 同: 代码: #include<iostr ...
- Android线程的创建与销毁
摘要: 在Android开发中经常会使用到线程,一想到线程,很多同学就立即使用new Thread(){...}.start()这样的方式.这样如果在一个Activity中多次调用上面的代码,那么将创 ...
- 基于jQuery经典扫雷游戏源码
分享一款基于jQuery经典扫雷游戏源码.这是一款网页版扫雷小游戏特效代码下载.效果图如下: 在线预览 源码下载 实现的代码. html代码: <center> <h1>j ...
- Python3 ctypes简单使用
>>> from ctypes import * >>> c_int() c_long(0) >>> c_char_p(b'hello') c_c ...