Constructor and Description |
---|
CanvasSWT(org.eclipse.swt.graphics.GC graphic)
Creates a new instance of Pencil2dAWT.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
void |
drawBackground(Color color,
int width,
int heigth) |
void |
drawDot(Color color,
int x,
int y) |
void |
drawOval(Color color,
int x,
int y,
int width,
int height) |
void |
drawRect(Color color,
int x,
int y,
int width,
int height) |
void |
drawRect(Color color,
int x,
int y,
int width,
int height,
boolean border) |
void |
drawString(int x,
int y,
String text) |
org.eclipse.swt.graphics.Color |
toSWTColor(Color color)
Converts a
Imaging Color
into a SWT Color . |
public CanvasSWT(org.eclipse.swt.graphics.GC graphic)
public void dispose()
public void drawString(int x, int y, String text)
drawString
in interface Canvas
public void drawRect(Color color, int x, int y, int width, int height, boolean border)
public void drawRect(Color color, int x, int y, int width, int height)
public void drawOval(Color color, int x, int y, int width, int height)
public void drawBackground(Color color, int width, int heigth)
drawBackground
in interface Canvas
public org.eclipse.swt.graphics.Color toSWTColor(Color color)
Imaging Color
into a SWT Color
.
Note that SWT colors do not have an alpha channel.Copyright © 2021. All rights reserved.