/** * This factory method creates a Placemark and an associated PlacemarkAttributes bundle that draws the given image * centered on the supplied position. * * @param position The geographic position with the placemark is drawn. * @param imageSource The object containing the image that is drawn. * * @return A new Placemark with a PlacemarkAttributes bundle. */ public static Placemark createWithImage(Position position, ImageSource imageSource) { return new Placemark(position, PlacemarkAttributes.createWithImage(imageSource)); }
/** * This factory method creates a Placemark and an associated PlacemarkAttributes bundle that draws a simple square * centered on the supplied position with the given size and color. * * @param position The geographic position where the placemark is drawn. * @param color The color of the placemark. * @param pixelSize The width and height of the placemark. * * @return A new Placemark with a PlacemarkAttributes bundle. */ public static Placemark createWithColorAndSize(Position position, Color color, int pixelSize) { return new Placemark(position, new PlacemarkAttributes().setImageColor(color).setImageScale(pixelSize)); }
/** * Constructs a Placemark that draws its representation at the supplied position using default {@link * PlacemarkAttributes} bundle. The displayName and label properties are empty. * * @param position The placemark's geographic position */ public Placemark(Position position) { this(position, new PlacemarkAttributes()); }
@Test public void testGetAttributes() throws Exception { ShapeAttributes attributes = new ShapeAttributes(); AbstractShape shape = new AbstractShapeImpl(attributes); ShapeAttributes result = shape.getAttributes(); assertTrue(attributes == result); }
@Test public void testGetHighlightAttributes() throws Exception { ShapeAttributes attributes = new ShapeAttributes(); AbstractShape shape = new AbstractShapeImpl(); shape.highlightAttributes = attributes; ShapeAttributes result = shape.getHighlightAttributes(); assertTrue(attributes == result); }
@Test public void testSetHighlightAttributes() throws Exception { ShapeAttributes attributes = new ShapeAttributes(); AbstractShape shape = new AbstractShapeImpl(); shape.setHighlightAttributes(attributes); assertTrue(attributes == shape.highlightAttributes); }
@Test public void testSetAttributes() throws Exception { ShapeAttributes attributes = new ShapeAttributes(); AbstractShape shape = new AbstractShapeImpl(); shape.setAttributes(attributes); assertTrue(attributes == shape.attributes); }
/** * A position associated with the object that indicates its aggregate geographic position. For a Placemark, this is * simply it's position property. * * @return {@link Placemark#getPosition()} */ @Override public Position getReferencePosition() { return getPosition(); }
/** * Moves the shape over the globe's surface. For a Placemark, this simply calls {@link * Placemark#setPosition(Position)}. * * @param globe not used. * @param position the new position of the shape's reference position. */ @Override public void moveTo(Globe globe, Position position) { setPosition(position); }
/** * Moves the sightline over the globe's surface. For an OmnidirectionalSightline, this simply calls {@link * OmnidirectionalSightline#setPosition(Position)}. * * @param globe not used. * @param position the new position of the sightline's reference position. */ @Override public void moveTo(Globe globe, Position position) { this.setPosition(position); }
protected boolean mustAssembleGeometry(RenderContext rc) { int calculatedIntervals = this.computeIntervals(rc); int sanitizedIntervals = this.sanitizeIntervals(calculatedIntervals); if (this.vertexArray == null || sanitizedIntervals != this.activeIntervals) { this.activeIntervals = sanitizedIntervals; return true; } return false; }
@Override public void run() { placemarkAttributes.setImageOffset(placemarkOffset); } });
public void setFollowTerrain(boolean followTerrain) { this.followTerrain = followTerrain; this.reset(); }
/** * A position associated with the object that indicates its aggregate geographic position. For a Label, this is * simply it's position property. * * @return {@link Label#getPosition()} */ @Override public Position getReferencePosition() { return this.getPosition(); }
/** * Moves the shape over the globe's surface. For a Label, this simply calls {@link Label#setPosition(Position)}. * * @param globe not used. * @param position the new position of the shape's reference position. */ @Override public void moveTo(Globe globe, Position position) { this.setPosition(position); }
public Ellipse setExtrude(boolean extrude) { this.extrude = extrude; this.reset(); return this; }
/** * A position associated with the object that indicates its aggregate geographic position. For an * OmnidirectionalSightline, this is simply it's position property. * * @return {@link #getPosition()} */ @Override public Position getReferencePosition() { return this.getPosition(); }
@Override public void errorData(int errnum, Object polygonData) { tessError((RenderContext) polygonData, errnum); } };
public void setExtrude(boolean extrude) { this.extrude = extrude; this.reset(); }
public void setExtrude(boolean extrude) { this.extrude = extrude; this.reset(); }