package ol.style;

import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;

import ol.Options;

/**
 * Options for {@link Text}.
 * @author Tino Desjardins
 */
@JsType(isNative = true)
public interface TextOptions extends Options {

	/**
	 * Font style as CSS 'font' value, see:
	 * https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/font. Default is '10px sans-serif'
	 * @param font String
	 */
	@JsProperty
	void setFont(String font);

	/**
	 * Horizontal text offset in pixels. A positive will shift the text right. Default is 0.
	 * @param offsetX int
	 */
	@JsProperty
	void setOffsetX(int offsetX);

	/**
	 * Vertical text offset in pixels. A positive will shift the text down. Default is 0.
	 * @param offsetY int
	 */
	@JsProperty
	void setOffsetY(int offsetY);

	/**
	 * Rotation in radians (positive rotation clockwise). Default is 0.
	 * @param rotation int
	 */
	@JsProperty
	void setRotation(int rotation);

	/**
	 * Scale.
	 * @param scale int
	 */
	@JsProperty
	void setScale(int scale);

	/**
	 * Fill style. If none is provided, we'll use a dark fill-style (#333).
	 * @param fill ol.style.Fill
	 */
	@JsProperty
	void setFill(ol.style.Fill fill);

	/**
	 * Stroke style.
	 * @param stroke ol.style.Stroke
	 */
	@JsProperty
	void setStroke(ol.style.Stroke stroke);

	/**
	 * Text content.
	 * @param text String
	 */
	@JsProperty
	void setText(String text);

	/**
	 * Text alignment. Possible values: 'left', 'right', 'center', 'end' or 'start'. Default is 'start'.
	 * @param textAlign String
	 */
	@JsProperty
	void setTextAlign(String textAlign);

	/**
	 * Text base line. Possible values: 'bottom', 'top', 'middle', 'alphabetic', 'hanging', 'ideographic'. Default is
	 * 'alphabetic'.
	 * @param textBaseline String
	 */
	@JsProperty
	void setTextBaseline(String textBaseline);

}

@@ -8,24 +8,64 @@
  ol.style;%0A%0A
+import jsinterop.annotations.JsPackage;%0A
 import jsint
@@ -93,16 +93,16 @@
 operty;%0A
-
 import j
@@ -242,26 +242,69 @@
 true
-)%0Apublic interface
+, namespace = JsPackage.GLOBAL, name = %22Object%22)%0Apublic class
  Tex
@@ -316,14 +316,17 @@
 ons 
-extend
+implement
 s Op
@@ -527,32 +527,46 @@
 /%0A%09@JsProperty%0A%09
+public native 
 void setFont(Str
@@ -706,32 +706,46 @@
 /%0A%09@JsProperty%0A%09
+public native 
 void setOffsetX(
@@ -885,32 +885,46 @@
 /%0A%09@JsProperty%0A%09
+public native 
 void setOffsetY(
@@ -1047,32 +1047,46 @@
 /%0A%09@JsProperty%0A%09
+public native 
 void setRotation
@@ -1150,32 +1150,46 @@
 /%0A%09@JsProperty%0A%09
+public native 
 void setScale(in
@@ -1318,32 +1318,46 @@
 /%0A%09@JsProperty%0A%09
+public native 
 void setFill(ol.
@@ -1443,32 +1443,46 @@
 /%0A%09@JsProperty%0A%09
+public native 
 void setStroke(o
@@ -1563,32 +1563,46 @@
 /%0A%09@JsProperty%0A%09
+public native 
 void setText(Str
@@ -1759,32 +1759,46 @@
 /%0A%09@JsProperty%0A%09
+public native 
 void setTextAlig
@@ -2006,17 +2006,31 @@
 roperty%0A
-
 %09
+public native 
 void set

Convert TextOptions interface to class