diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 18:28:45 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-03 18:28:45 -0800 |
commit | d5193d9394c5e58176d7bcdf50ef017f8a3b9e1e (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /awt/java/awt/image/renderable/RenderContext.java | |
parent | 43aa2b1cbf7a03e248e10f4d0fec0463257cd52d (diff) | |
download | frameworks_native-d5193d9394c5e58176d7bcdf50ef017f8a3b9e1e.zip frameworks_native-d5193d9394c5e58176d7bcdf50ef017f8a3b9e1e.tar.gz frameworks_native-d5193d9394c5e58176d7bcdf50ef017f8a3b9e1e.tar.bz2 |
auto import from //depot/cupcake/@135843
Diffstat (limited to 'awt/java/awt/image/renderable/RenderContext.java')
-rw-r--r-- | awt/java/awt/image/renderable/RenderContext.java | 214 |
1 files changed, 0 insertions, 214 deletions
diff --git a/awt/java/awt/image/renderable/RenderContext.java b/awt/java/awt/image/renderable/RenderContext.java deleted file mode 100644 index 0db512f..0000000 --- a/awt/java/awt/image/renderable/RenderContext.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/** - * @author Igor V. Stolyarov - * @version $Revision$ - */ - -package java.awt.image.renderable; - -import java.awt.RenderingHints; -import java.awt.Shape; -import java.awt.geom.AffineTransform; - -/** - * The Class RenderContext stores data on how an image is to be rendered: the - * affine transform, the area of interest, and the rendering hints. - * - * @since Android 1.0 - */ -public class RenderContext implements Cloneable { - - /** - * The affine transform. - */ - AffineTransform transform; - - /** - * The area of interest. - */ - Shape aoi; - - /** - * The rendering hints. - */ - RenderingHints hints; - - /** - * Instantiates a new render context. - * - * @param usr2dev - * the affine transform. - * @param aoi - * the area of interest. - * @param hints - * the rendering hints. - */ - public RenderContext(AffineTransform usr2dev, Shape aoi, RenderingHints hints) { - this.transform = (AffineTransform)usr2dev.clone(); - this.aoi = aoi; - this.hints = hints; - } - - /** - * Instantiates a new render context with no specified hints. - * - * @param usr2dev - * the affine transform. - * @param aoi - * the area of interest. - */ - public RenderContext(AffineTransform usr2dev, Shape aoi) { - this(usr2dev, aoi, null); - } - - /** - * Instantiates a new render context with no specified area of interest. - * - * @param usr2dev - * the affine transform. - * @param hints - * the rendering hints. - */ - public RenderContext(AffineTransform usr2dev, RenderingHints hints) { - this(usr2dev, null, hints); - } - - /** - * Instantiates a new render context with no rendering hints or area of - * interest. - * - * @param usr2dev - * the affine transform. - */ - public RenderContext(AffineTransform usr2dev) { - this(usr2dev, null, null); - } - - @Override - public Object clone() { - return new RenderContext(transform, aoi, hints); - } - - /** - * Sets the affine transform for this render context. - * - * @param newTransform - * the new affine transform. - */ - public void setTransform(AffineTransform newTransform) { - transform = (AffineTransform)newTransform.clone(); - } - - /** - * Concatenates the current transform with the specified transform (so they - * are applied with the specified transform acting first) and sets the - * resulting transform as the affine transform of this rendering context. - * - * @param modTransform - * the new transform which modifies the current transform. - * @deprecated use - * {@link RenderContext#preConcatenateTransform(AffineTransform)} - * . - */ - @Deprecated - public void preConcetenateTransform(AffineTransform modTransform) { - preConcatenateTransform(modTransform); - } - - /** - * Concatenates the current transform with the specified transform (so they - * are applied with the specified transform acting first) and sets the - * resulting transform as the affine transform of this rendering context. - * - * @param modTransform - * the new transform which modifies the current transform. - */ - public void preConcatenateTransform(AffineTransform modTransform) { - transform.preConcatenate(modTransform); - } - - /** - * Concatenate the specified transform with the current transform. - * - * @param modTransform - * the new transform which modifies the current transform. - * @deprecated use - * {@link RenderContext#concatenateTransform(AffineTransform)}. - */ - @Deprecated - public void concetenateTransform(AffineTransform modTransform) { - concatenateTransform(modTransform); - } - - /** - * Concatenate the specified transform with the current transform. - * - * @param modTransform - * the new transform which modifies the current transform. - */ - public void concatenateTransform(AffineTransform modTransform) { - transform.concatenate(modTransform); - } - - /** - * Gets the transform. - * - * @return the transform. - */ - public AffineTransform getTransform() { - return (AffineTransform)transform.clone(); - } - - /** - * Sets the area of interest. - * - * @param newAoi - * the new area of interest. - */ - public void setAreaOfInterest(Shape newAoi) { - aoi = newAoi; - } - - /** - * Gets the area of interest. - * - * @return the area of interest. - */ - public Shape getAreaOfInterest() { - return aoi; - } - - /** - * Sets the rendering hints. - * - * @param hints - * the new rendering hints. - */ - public void setRenderingHints(RenderingHints hints) { - this.hints = hints; - } - - /** - * Gets the rendering hints. - * - * @return the rendering hints. - */ - public RenderingHints getRenderingHints() { - return hints; - } -} |