Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
5f81bc71
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5f81bc71
编写于
3月 29, 2011
作者:
B
bae
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7003516: Methods java.awt.geom.Line2D.Double/Float.getBounds2D() don't satisfy inherited spec
Reviewed-by: flar, prr
上级
3d849cee
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
59 addition
and
3 deletion
+59
-3
src/share/classes/java/awt/Shape.java
src/share/classes/java/awt/Shape.java
+59
-3
未找到文件。
src/share/classes/java/awt/Shape.java
浏览文件 @
5f81bc71
...
...
@@ -43,7 +43,7 @@ import java.awt.geom.Rectangle2D;
* object that describes the trajectory path of the <code>Shape</code>
* outline.
* <p>
* <
b>Definition of insideness:</b
>
* <
a name="def_insideness"><b>Definition of insideness:</b></a
>
* A point is considered to lie inside a
* <code>Shape</code> if and only if:
* <ul>
...
...
@@ -88,6 +88,32 @@ public interface Shape {
* <code>getBounds2D</code> method generally returns a
* tighter bounding box due to its greater flexibility in
* representation.
*
* <p>
* Note that the <a href="{@docRoot}/java/awt/Shape.html#def_insideness">
* definition of insideness</a> can lead to situations where points
* on the defining outline of the {@code shape} may not be considered
* contained in the returned {@code bounds} object, but only in cases
* where those points are also not considered contained in the original
* {@code shape}.
* </p>
* <p>
* If a {@code point} is inside the {@code shape} according to the
* {@link #contains(double x, double y) contains(point)} method, then
* it must be inside the returned {@code Rectangle} bounds object
* according to the {@link #contains(double x, double y) contains(point)}
* method of the {@code bounds}. Specifically:
* </p>
* <p>
* {@code shape.contains(x,y)} requires {@code bounds.contains(x,y)}
* </p>
* <p>
* If a {@code point} is not inside the {@code shape}, then it might
* still be contained in the {@code bounds} object:
* </p>
* <p>
* {@code bounds.contains(x,y)} does not imply {@code shape.contains(x,y)}
* </p>
* @return an integer <code>Rectangle</code> that completely encloses
* the <code>Shape</code>.
* @see #getBounds2D
...
...
@@ -107,6 +133,32 @@ public interface Shape {
* to overflow problems since the return value can be an instance of
* the <code>Rectangle2D</code> that uses double precision values to
* store the dimensions.
*
* <p>
* Note that the <a href="{@docRoot}/java/awt/Shape.html#def_insideness">
* definition of insideness</a> can lead to situations where points
* on the defining outline of the {@code shape} may not be considered
* contained in the returned {@code bounds} object, but only in cases
* where those points are also not considered contained in the original
* {@code shape}.
* </p>
* <p>
* If a {@code point} is inside the {@code shape} according to the
* {@link #contains(Point2D p) contains(point)} method, then it must
* be inside the returned {@code Rectangle2D} bounds object according
* to the {@link #contains(Point2D p) contains(point)} method of the
* {@code bounds}. Specifically:
* </p>
* <p>
* {@code shape.contains(p)} requires {@code bounds.contains(p)}
* </p>
* <p>
* If a {@code point} is not inside the {@code shape}, then it might
* still be contained in the {@code bounds} object:
* </p>
* <p>
* {@code bounds.contains(p)} does not imply {@code shape.contains(p)}
* </p>
* @return an instance of <code>Rectangle2D</code> that is a
* high-precision bounding box of the <code>Shape</code>.
* @see #getBounds
...
...
@@ -116,7 +168,9 @@ public interface Shape {
/**
* Tests if the specified coordinates are inside the boundary of the
* <code>Shape</code>.
* <code>Shape</code>, as described by the
* <a href="{@docRoot}/java/awt/Shape.html#def_insideness">
* definition of insideness</a>.
* @param x the specified X coordinate to be tested
* @param y the specified Y coordinate to be tested
* @return <code>true</code> if the specified coordinates are inside
...
...
@@ -128,7 +182,9 @@ public interface Shape {
/**
* Tests if a specified {@link Point2D} is inside the boundary
* of the <code>Shape</code>.
* of the <code>Shape</code>, as described by the
* <a href="{@docRoot}/java/awt/Shape.html#def_insideness">
* definition of insideness</a>.
* @param p the specified <code>Point2D</code> to be tested
* @return <code>true</code> if the specified <code>Point2D</code> is
* inside the boundary of the <code>Shape</code>;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录