Available Methods
- NONE
- BORDER
- V_SCROLL
- PUSH
- CHECK
- LEFT
- MULTI
- SINGLE
- READ_ONLY
- OK
- H_SCROLL
- FILL
- CENTER
- WRAP
- error ( )
- ICON_ERROR
- RIGHT
- NULL
- HORIZONTAL
- FULL_SELECTION
- BOLD
- SEPARATOR
- DEFAULT
- RADIO
- RESIZE
- FLAT
- VERTICAL
- TOP
- DROP_DOWN
- ITALIC
- NORMAL
- SAVE
- ICON_INFORMATION
- CTRL
- SHIFT
- NO_FOCUS
- APPLICATION_MODAL
- DIALOG_TRIM
- DOUBLE_BUFFERED
- OPEN
- CR
- ARROW_DOWN
- Selection ( )
- YES
- CANCEL
- BOTTOM
- NO_BACKGROUND
- NO
- CLOSE
- ICON_WARNING
- RIGHT_TO_LEFT
- LEFT_TO_RIGHT
- TOGGLE
- SHEET
- DOWN
- BEGINNING
- MAX
- ARROW_LEFT
- ARROW_RIGHT
- NO_TRIM
- END
- ON_TOP
- MIN
- ARROW_UP
- KeyDown ( )
- KeyUp ( )
- ICON_QUESTION
- Dispose ( )
- ALT
- CASCADE
- VIRTUAL
- SHADOW_ETCHED_IN
- PAGE_UP
- DEL
- FocusOut ( )
- Traverse ( )
- PASSWORD
- SHELL_TRIM
- ARROW
- Deactivate ( )
- BS
- FocusIn ( )
- ESC
- LEAD
- MouseUp ( )
- SMOOTH
- MouseDoubleClick ( )
- TRAVERSE_TAB_NEXT
- UP
- MouseDown ( )
- TITLE
- Paint ( )
- PAGE_DOWN
- Move ( )
- HOME
- SHADOW_IN
- TRAVERSE_TAB_PREVIOUS
- F2 ( )
- LINE_SOLID
- HIDE_SELECTION
- JOIN_BEVEL
- SHADOW_NONE
- Modify ( )
- BAR
- SEARCH
- COMMAND
- LINE_DASHDOT
- ICON_SEARCH
- TAB
- SHADOW_OUT
- LINE_DASH
- KEYPAD_CR
- LINE_DOT
- JOIN_ROUND
- MOD1 ( )
- TOOL
- MODIFIER_MASK
- CURSOR_ARROW
- IMAGE_GIF
- LF
- MouseEnter ( )
- MouseMove ( )
- TRAVERSE_ARROW_PREVIOUS
- UNDERLINE_LINK
- MODELESS
- CURSOR_HAND
- IMAGE_JPEG
- MouseHover ( )
- CURSOR_WAIT
- getPlatform ( )
- IMAGE_BMP
- PRIMARY_MODAL
- CAP_FLAT
- UNDERLINE_ERROR
- POP_UP
- CAP_ROUND
- SIMPLE
- DATE
- EraseItem ( )
- TRANSPARENT
- TIME
- CAP_SQUARE
- COLOR_DARK_GREEN
- FOREGROUND
- INHERIT_DEFAULT
- KEYPAD_SUBTRACT
- TRAVERSE_ARROW_NEXT
- Help ( )
- LINE_DASHDOTDOT
- TRAVERSE_ESCAPE
- MouseExit ( )
- JOIN_MITER
- NO_SCROLL
- Collapse ( )
- F9 ( )
- FILL_WINDING
- HIGH
- ERROR_NULL_ARGUMENT
- BORDER_DOT
- CAPS_LOCK
- ICON_CANCEL
- KEYPAD_4 ( )
- PATH_MOVE_TO
- MOD2 ( )
- INDETERMINATE
- NO_REDRAW_RESIZE
- INSERT
- DefaultSelection ( )
- SYSTEM_MODAL
- IMAGE_COPY
- CALENDAR
- BACKGROUND
- MOD4 ( )
Related Classes
- java.io.File
- org.eclipse.swt.widgets.Composite
- org.eclipse.swt.widgets.Display
- org.eclipse.swt.widgets.Button
- org.eclipse.swt.widgets.Label
- org.eclipse.swt.widgets.Shell
- org.eclipse.swt.layout.GridData
- org.eclipse.swt.widgets.Text
- org.eclipse.swt.layout.GridLayout
- org.eclipse.swt.events.SelectionEvent
- org.eclipse.swt.events.SelectionAdapter
- org.eclipse.swt.widgets.Control
- org.eclipse.swt.graphics.Image
- org.eclipse.swt.widgets.Group
- org.eclipse.swt.widgets.Event
- org.eclipse.swt.graphics.Point
- org.eclipse.swt.graphics.Color
- org.eclipse.ui.PlatformUI
- org.eclipse.swt.widgets.Listener
- org.eclipse.swt.events.SelectionListener
- org.eclipse.swt.events.ModifyListener
- org.eclipse.swt.widgets.Combo
- org.eclipse.swt.widgets.FileDialog
- org.eclipse.swt.events.ModifyEvent
- org.eclipse.jface.viewers.IStructuredSelection
Java Code Examples for org.eclipse.swt.SWT#PATH_MOVE_TO
The following examples show how to use
org.eclipse.swt.SWT#PATH_MOVE_TO .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SvgLoader.java From nebula with Eclipse Public License 2.0 | 6 votes |
private static int parseLine(SvgContainer container, char[] ca, int start, int end) { end = findClosingTag(ca, start, end); if(end != -1) { int endAttrs = closer(ca, start, end); SvgShape element = new SvgShape(container, getAttrValue(ca, start, endAttrs, ATTR_ID)); element.pathData = new PathData(); element.pathData.types = new byte[2]; element.pathData.points = new float[4]; element.pathData.types[0] = (byte)SWT.PATH_MOVE_TO; element.pathData.points[0] = parseFloat(getAttrValue(ca, start, endAttrs, ATTR_X1), 0); element.pathData.points[1] = parseFloat(getAttrValue(ca, start, endAttrs, ATTR_Y1), 0); element.pathData.types[1] = (byte)SWT.PATH_LINE_TO; element.pathData.points[2] = parseFloat(getAttrValue(ca, start, endAttrs, ATTR_X2), 0); element.pathData.points[3] = parseFloat(getAttrValue(ca, start, endAttrs, ATTR_Y2), 0); parseFill(element, ca, start, endAttrs); parseStroke(element, ca, start, endAttrs); } return end; }
Example 2
Source File: SvgLoader.java From nebula with Eclipse Public License 2.0 | 6 votes |
private static int parsePolygon(SvgContainer container, char[] ca, int start, int end) { end = findClosingTag(ca, start, end); if(end != -1) { int endAttrs = closer(ca, start, end); SvgShape element = new SvgShape(container, getAttrValue(ca, start, endAttrs, ATTR_ID)); float[] linePoints = parsePoints(getAttrValue(ca, start, endAttrs, ATTR_POINTS)); element.pathData = new PathData(); element.pathData.types = new byte[1+(linePoints.length/2)]; element.pathData.points = new float[linePoints.length]; element.pathData.types[0] = (byte)SWT.PATH_MOVE_TO; element.pathData.points[0] = linePoints[0]; element.pathData.points[1] = linePoints[1]; int i = 2, j = 1; while(i < linePoints.length-1) { element.pathData.types[j++] = (byte)SWT.PATH_LINE_TO; element.pathData.points[i] = linePoints[i++]; element.pathData.points[i] = linePoints[i++]; } element.pathData.types[element.pathData.types.length-1] = (byte)SWT.PATH_CLOSE; parseFill(element, ca, start, endAttrs); parseStroke(element, ca, start, endAttrs); element.transform = getTransform(ca, getAttrValueRange(ca, start, endAttrs, ATTR_TRANSFORM)); } return end; }
Example 3
Source File: SvgLoader.java From nebula with Eclipse Public License 2.0 | 6 votes |
private static int parsePolyline(SvgContainer container, char[] ca, int start, int end) { end = findClosingTag(ca, start, end); if(end != -1) { int endAttrs = closer(ca, start, end); SvgShape element = new SvgShape(container, getAttrValue(ca, start, endAttrs, ATTR_ID)); float[] linePoints = parsePoints(getAttrValue(ca, start, endAttrs, ATTR_POINTS)); element.pathData = new PathData(); element.pathData.types = new byte[linePoints.length/2]; element.pathData.points = new float[linePoints.length]; element.pathData.types[0] = (byte)SWT.PATH_MOVE_TO; element.pathData.points[0] = linePoints[0]; element.pathData.points[1] = linePoints[1]; int i = 2, j = 1; while(i < linePoints.length-1) { element.pathData.types[j++] = (byte)SWT.PATH_LINE_TO; element.pathData.points[i] = linePoints[i++]; element.pathData.points[i] = linePoints[i++]; } parseFill(element, ca, start, endAttrs); parseStroke(element, ca, start, endAttrs); element.transform = getTransform(ca, getAttrValueRange(ca, start, endAttrs, ATTR_TRANSFORM)); } return end; }
Example 4
Source File: SWT2AWT.java From gef with Eclipse Public License 2.0 | 4 votes |
/** * Converts an SWT {@link PathData} into an equivalent AWT * {@link PathIterator}. * * @param pathData * the {@link PathData} to convert. * @param windingRule * the winding rule to use when constructing the * {@link PathIterator}, i.e. one of {@link SWT#FILL_WINDING} or * {@link SWT#FILL_EVEN_ODD}. * @return a new {@link PathIterator} representing the same path */ public static PathIterator toAWTPathIterator(PathData pathData, int windingRule) { if (windingRule != SWT.FILL_WINDING && windingRule != SWT.FILL_EVEN_ODD) { throw new IllegalArgumentException( "Unsupported winding rule. Must be one of SWT.FILL_WINDING or SWT.FILL_EVEN_ODD"); } Path2D.Double path = new Path2D.Double( windingRule == SWT.FILL_EVEN_ODD ? Path2D.WIND_EVEN_ODD : Path2D.WIND_NON_ZERO); int j = 0; byte[] types = pathData.types; float[] points = pathData.points; double x, y, x2, y2, x3, y3; for (int i = 0; i < types.length; i++) { switch (types[i]) { case SWT.PATH_MOVE_TO: x = points[j++]; y = points[j++]; path.moveTo(x, y); break; case SWT.PATH_LINE_TO: x = points[j++]; y = points[j++]; path.lineTo(x, y); break; case SWT.PATH_QUAD_TO: x = points[j++]; y = points[j++]; x2 = points[j++]; y2 = points[j++]; path.quadTo(x, y, x2, y2); break; case SWT.PATH_CUBIC_TO: x = points[j++]; y = points[j++]; x2 = points[j++]; y2 = points[j++]; x3 = points[j++]; y3 = points[j++]; path.curveTo(x, y, x2, y2, x3, y3); break; case SWT.PATH_CLOSE: path.closePath(); break; default: break; } } return path.getPathIterator(null); }