📄 annotation.java
字号:
/*
Copyright (C) 2001, 2006, 2007 United States Government
as represented by the Administrator of the
National Aeronautics and Space Administration.
All Rights Reserved.
*/
package gov.nasa.worldwind.render;
import gov.nasa.worldwind.*;
import gov.nasa.worldwind.geom.Position;
import gov.nasa.worldwind.pick.*;
import javax.media.opengl.GL;
/**
* Represent a text label and its rendering attributes.
* @author Patrick Murris
* @version $Id: Annotation.java 10582 2009-04-28 16:39:07Z dcollins $
*/
public interface Annotation extends Renderable, Pickable, Disposable, Restorable
{
public static final String IMAGE_REPEAT_NONE = "render.Annotation.RepeatNone";
public static final String IMAGE_REPEAT_X = "render.Annotation.RepeatX";
public static final String IMAGE_REPEAT_Y = "render.Annotation.RepeatY";
public static final String IMAGE_REPEAT_XY = "render.Annotation.RepeatXY";
public final static int ANTIALIAS_DONT_CARE = GL.GL_DONT_CARE;
public final static int ANTIALIAS_FASTEST = GL.GL_FASTEST;
public final static int ANTIALIAS_NICEST = GL.GL_NICEST;
public final static String SIZE_FIXED = "render.Annotation.SizeFixed";
public final static String SIZE_FIT_TEXT = "render.Annotation.SizeFitText";
boolean isAlwaysOnTop();
void setAlwaysOnTop(boolean alwaysOnTop);
boolean isPickEnabled();
void setPickEnabled(boolean enable);
String getText();
void setText(String text);
AnnotationAttributes getAttributes();
void setAttributes(AnnotationAttributes attrs);
java.util.List<? extends Annotation> getChildren();
void addChild(Annotation annotation);
boolean removeChild(Annotation annotation);
void removeAllChildren();
AnnotationLayoutManager getLayout();
void setLayout(AnnotationLayoutManager layoutManager);
PickSupport getPickSupport();
void setPickSupport(PickSupport pickSupport);
Object getDelegateOwner();
void setDelegateOwner(Object delegateOwner);
java.awt.Dimension getPreferredSize(DrawContext dc);
/**
* Draws the annotation immedately on the specified DrawContext. Rendering is not be delayed by use of the
* DrawContext's ordered mechanism, or any other delayed rendering mechanism. This is typically called by an
* AnnotationRenderer while batch rendering. The GL should have its model view set to the identity matrix.
*
* @param dc the current DrawContext.
*
* @throws IllegalArgumentException if <code>dc</code> is null.
*/
void renderNow(DrawContext dc);
/**
* Draws the annotation without transforming to its screen position, or applying any scaling. This Annotation is
* draw with the specified width, height, and opacity. The GL should have its model view set to whatever
* transformation is desired.
*
* @param dc the current DrawContext.
* @param width the width of the Annotation.
* @param height the height of the Annotation.
* @param opacity the opacity of the Annotation.
* @param pickPosition the picked Position assigned to the Annotation, if picking is enabled.
*
* @throws IllegalArgumentException if <code>dc</code> is null.
*/
void draw(DrawContext dc, int width, int height, double opacity, Position pickPosition);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -