Movatterモバイル変換


[0]ホーム

URL:


The 2D Graphics Group

ThisGroup wasdissolved and consolidated into theClient Libraries Group.

The 2D Graphicsgroup is centered aroundpeople interested in the creation and maintenance of the 2D API andimplementation.

Introduction

The Java 2D API and its implementation isoften not easily separable from other parts of the Javaplatform.

Generally it implements geometry, text and image APIsand renders these to screen and printer devices using software, orhardware accelerated means, depending on implementation and/orapplication or user specified system properties.

Very briefly, the core of the API is the classjava.awt.Graphics2D. It provides methods for the renderingoperations, as well as controlling the state of the Graphicsinstance.

There's a large supporting cast of classes in thepackages

Image I/O provides the means to load and save sampledimages where the in-process image use Java2D's image format.

javax.print is tightly integrated withthe java.awt.print package which is the 2D API for rendering toprinter graphics devices.


Group policies.

Source code conventions

All source code should follow the standard Java source codeconventions as well as jcheck rules. Some of the most common onesto remember are :ConsultCodeConventions for the Java(TM) Programming Language for the fulllist.

Regression tests

Tests should be provided unless clearly infeasible. Automatedtests are desirable. SQE rarely run manual tests. Don't give upeasily. There are tests that render to a BufferedImage and analysethe resulting contents to see if they behaved correctly, so writingautomated tests is possible in more cases than immediatelyapparent.

Code Reviews

Code reviews are one of the most important mechanisms we havefor integrating and shipping good, solid, compatible code. Reviewsare also an invaluable source of education for all of us, and agreat mechanism for ensuring consistent code quality, as we allread and learn from reading each other's code.

The standard requirement in Java SE is for one (or more)reviewer prior to code freeze and two (or more) reviewersthereafter. The Java client groups have standardized on tworeviewers at all times with few exceptions.

The choice of which people review the code is up to theindividual engineer and depends upon each specific situation, butsome general guidelines are:

It is the responsibility of the implementing engineer to contactthe reviewers, respond to their concerns, and make the final codeadhere to changes agreed upon by the engineer and thereviewers.

It is the responsibility of the reviewers to provide timelyreviews, and understand (to the extent possible) and agree to thechanges that the engineer has implemented; when the code is putbackto the workspace,the reviewers are also takingresponsibility for these changes. We can only have goodreviews, and good resulting code, if the reviewers take their jobsseriously and review the changes thoroughly. Given the costs andhassles of maintaining backward-compatible code indefinitely, wecannot risk code going in that is only cursorily reviewed; it isfar easier and cheaper to catch flaws in the review process than itis to fix them in bugs and escalations later on.

The most common exceptions to the two reviewer policy would befor

The general process for reviews is as follows:


Regarding Java 2D's source code.

All of Java 2D's code is in the "java.desktop"module, so all references below are relative to the root of the"java.desktop" module.

Aside from the information below developers may find it usefulto consultDistinguishing 2D and AWTsource files..

Most of the relevant sources have a java and nativecomponent.

Most of 2D's code is in 'share'. There is a stillsignificant but lesser amount of code that is specific to X11 orWin32/GDI or macOS. But here for brevity we just point out theshared locations.

These all are under"share". The Javaclasses are located corresponding to the package hierarchy. E.g.java.awt.Graphics2D is in:

Implementation (non-public) classes are generally ina package starting with "sun.". E.g.:

There are exceptions, notably:

Java 2D also has a substantial amount of native code.This is organised by the shared library into which it iscompiled:

(Note that the platform-specific native code is in acorresponding[platform]/native/.. directory)

The shared code location contains essentiallycomplete implementations of everything since 2D has its own codefor everything needed to implement the API.

The relevant java.desktop make files found inmake/modules/java.desktop.

A more fine grained break down of 2D files, particularly versusAWT component files, can be foundhere.

OpenJDK logo
Installing
Contributing
Sponsoring
Developers' Guide
Vulnerabilities
JDK GA/EA Builds
Mailing lists
Wiki ·IRC
Mastodon
Bluesky
Bylaws ·Census
Legal
Workshop
JEP Process
Source code
GitHub
Mercurial
Tools
Git
jtreg harness
Groups
(overview)
Adoption
Build
Client Libraries
Compatibility & Specification Review
Compiler
Conformance
Core Libraries
Governing Board
HotSpot
IDE Tooling & Support
Internationalization
JMX
Members
Networking
Porters
Quality
Security
Serviceability
Vulnerability
Web
Projects
(overview,archive)
Amber
Babylon
CRaC
Code Tools
Coin
Common VM Interface
Developers' Guide
Device I/O
Duke
Galahad
Graal
IcedTea
JDK 8 Updates
JDK 9
JDK (…,24,25,26)
JDK Updates
JMC
Jigsaw
Kona
Kulla
Lanai
Leyden
Lilliput
Locale Enhancement
Loom
Memory Model Update
Metropolis
Multi-Language VM
Nashorn
New I/O
OpenJFX
Panama
Penrose
Port: AArch32
Port: AArch64
Port: BSD
Port: Haiku
Port: Mac OS X
Port: MIPS
Port: Mobile
Port: PowerPC/AIX
Port: RISC-V
Port: s390x
SCTP
Shenandoah
Skara
Sumatra
Tsan
Valhalla
Verona
VisualVM
Wakefield
Zero
ZGC
Oracle logo
© 2025 Oracle Corporation and/or its affiliates
Terms of Use · License:GPLv2 ·Privacy ·Trademarks

[8]ページ先頭

©2009-2025 Movatter.jp