/** * Writes the value expressed as a {@code cartesian2}, which is the number of grid lines along each axis. * @param x The X component. * @param y The Y component. */ public final void writeCartesian2(double x, double y) { writeCartesian2(new Rectangular(x, y)); }
/** * Writes the value expressed as a {@code cartesian2}, which is the pixel offset specified as a two-dimensional Cartesian value {@code [X, Y]}, in viewport coordinates in pixels, where X is pixels to the right and Y is pixels up. * @param x The X component. * @param y The Y component. */ public final void writeCartesian2(double x, double y) { writeCartesian2(new Rectangular(x, y)); }
/** * Divides this instance by a scalar. * @param scalar The divisor, or value which is to divide this instance. * @return A set of {@link Rectangular} coordinates that represents the result of the division. */ @CS2JWarning("Unhandled attribute removed: Pure") @Nonnull public final Rectangular divide(double scalar) { return new Rectangular(m_x / scalar, m_y / scalar); }
/** * Writes the value expressed as a {@code cartesian2}, which is the property specified as a two-dimensional Cartesian value {@code [X, Y]}. * @param x The X component. * @param y The Y component. */ public final void writeCartesian2(double x, double y) { writeCartesian2(new Rectangular(x, y)); }
/** * Writes the value expressed as a {@code cartesian2}, which is the background padding specified as a two-dimensional Cartesian value {@code [X, Y]}, in pixels, where X is the horizontal padding, and Y is the vertical padding. * @param x The X component. * @param y The Y component. */ public final void writeCartesian2(double x, double y) { writeCartesian2(new Rectangular(x, y)); }
/** * Writes the value expressed as a {@code cartesian2}, which is the offset of grid lines along each axis, specified as a percentage from 0 to 1. * @param x The X component. * @param y The Y component. */ public final void writeCartesian2(double x, double y) { writeCartesian2(new Rectangular(x, y)); }
/** * Subtracts the specified set of {@link Rectangular} coordinates from this instance. * @param other The subtrahend, or value which is to be subtracted from this instance. * @return A set of {@link Rectangular} coordinates that represents the result of the subtraction. */ @CS2JWarning("Unhandled attribute removed: Pure") @Nonnull public final Rectangular subtract(@Nonnull Rectangular other) { return new Rectangular(m_x - other.m_x, m_y - other.m_y); }
/** * Negates the specified set of {@link Rectangular} coordinates, yielding a new set of {@link Rectangular} coordinates. * @param coordinates The set of coordinates. * @return The result of negating the elements of the original set of {@link Rectangular} coordinates. */ @CS2JInfo("This method implements the functionality of the overloaded operator: 'Rectangular -(Rectangular)'") @Nonnull public static Rectangular negate(@Nonnull Rectangular coordinates) { return new Rectangular(-coordinates.m_x, -coordinates.m_y); }
/** * Writes the value expressed as a {@code cartesian2}, which is the thickness specified as a two-dimensional Cartesian value {@code [X, Y]}, in pixels. * @param x The X component. * @param y The Y component. */ public final void writeCartesian2(double x, double y) { writeCartesian2(new Rectangular(x, y)); }
/** * Writes the value expressed as a {@code cartesian2}, which is the number of times the image repeats along each axis. * @param x The X component. * @param y The Y component. */ public final void writeCartesian2(double x, double y) { writeCartesian2(new Rectangular(x, y)); }
/** * Inverts this instance. * @return A set of {@link Rectangular} coordinates that represents the inverse of this instance. */ @CS2JWarning("Unhandled attribute removed: Pure") @Nonnull public final Rectangular invert() { return new Rectangular(-m_x, -m_y); }
/** * Multiplies this instance by a scalar. * @param scalar The multiplier, or value which is to multiply this instance. * @return A set of {@link Rectangular} coordinates that represents the result of the multiplication. */ @CS2JWarning("Unhandled attribute removed: Pure") @Nonnull public final Rectangular multiply(double scalar) { return new Rectangular(m_x * scalar, m_y * scalar); }
/** * Adds the specified set of {@link Rectangular} coordinates to this instance. * @param other The addend, or value which is to be added to this instance. * @return A set of {@link Rectangular} coordinates that represents the result of the addition. */ @CS2JWarning("Unhandled attribute removed: Pure") @Nonnull public final Rectangular add(@Nonnull Rectangular other) { return new Rectangular(m_x + other.m_x, m_y + other.m_y); }
/** * Produces a set of {@link Rectangular} coordinates representing this instance which results from rotating the original axes used to represent this instance by the provided angle. * <p> This type of rotation is sometimes referred to as an "alias rotation". * @param angle The angle of rotation. * @return A set of {@link Rectangular} coordinates which is the result of the rotation. */ @CS2JWarning("Unhandled attribute removed: Pure") @Nonnull public final Rectangular rotate(double angle) { double c = Math.cos(angle); double s = Math.sin(angle); return new Rectangular(c * m_x - s * m_y, s * m_x + c * m_y); }
@Test public final void testBackgroundPaddingProperty() { { final PacketCesiumWriter usingExpression_4 = (getPacket()); try { { LabelCesiumWriter label = getPacket().openLabelProperty(); try { { LabelCesiumWriter interval = label.openInterval(); try { interval.writeBackgroundPaddingProperty(new Rectangular(3D, 4D)); } finally { DisposeHelper.dispose(interval); } } } finally { DisposeHelper.dispose(label); } } } finally { DisposeHelper.dispose(usingExpression_4); } } Assert.assertEquals("{\"label\":{\"backgroundPadding\":{\"cartesian2\":[3,4]}}}", getStringWriter().toString()); }