Graphics¶
-
php\swing\Graphics Class Graphics
Properties
Methods
__construct()¶private
getTextWidth($str)¶Return width of str for drawText + current font
Параметры:
- $str –
Результат:
int
getTextHeight()¶Return height of one line text with current font
Результат: int
setPaintMode()¶
drawLine($x1, $y1, $x2, $y2)¶Draw line
Параметры:
- $x1 –
int- $y1 –
int- $x2 –
int- $y2 –
int
drawRect($x, $y, $width, $height)¶Draw rect
Параметры:
- $x –
int- $y –
int- $width –
int- $height –
int
fillRect($x, $y, $width, $height)¶
Параметры:
- $x –
int- $y –
int- $width –
int- $height –
int
draw3DRect($x, $y, $width, $height, $raised)¶Draws a 3-D highlighted outline of the specified rectangle.
Параметры:
- $x –
int- $y –
int- $width –
int- $height –
int- $raised –
fill3DRect($x, $y, $width, $height, $raised)¶
Параметры:
- $x –
int- $y –
int- $width –
int- $height –
int- $raised –
drawOval($x, $y, $width, $height)¶Draw oval
Параметры:
- $x –
int- $y –
int- $width –
int- $height –
int
fillOval($x, $y, $width, $height)¶
Параметры:
- $x –
int- $y –
int- $width –
int- $height –
int
drawArc($x, $y, $width, $height, $startAngle, $arcAngle)¶
Параметры:
- $x –
int- $y –
int- $width –
int- $height –
int- $startAngle –
int- $arcAngle –
int
fillArc($x, $y, $width, $height, $startAngle, $arcAngle)¶
Параметры:
- $x –
int- $y –
int- $width –
int- $height –
int- $startAngle –
int- $arcAngle –
int
drawPolygon($xy)¶
Параметры:
- $xy –
array- - [[x1, y1], [x2, y2], ... ]
fillPolygon($xy)¶
Параметры:
- $xy –
array- - [[x1, y1], [x2, y2], ... ]
drawPolyline($xy)¶
Параметры:
- $xy –
array- - [[x1, y1], [x2, y2], ... ]
drawImage($image, $x = 0, $y = 0, $newWidth = null, $newHeight = null)¶
Параметры:
- $image – php\swing\Image
- $x –
int- $y –
int- $newWidth –
null,int- $newHeight –
null,int
drawText($text, $x, $y)¶
Параметры:
- $text –
string- $x –
int- $y –
int
clipRect($x, $y, $width, $height)¶Intersects the current clip with the specified rectangle.
Параметры:
- $x –
int- $y –
int- $width –
int- $height –
int
clearRect($x, $y, $width, $height)¶Clears the specified rectangle by filling it with the background color of the current drawing surface.
Параметры:
- $x –
int- $y –
int- $width –
int- $height –
int
setXORMode($color)¶
Параметры:
- $color – php\swing\Color,
int,array
translate($x, $y)¶Translates the origin of the graphics context to the point (x, y) in the current coordinate system.
Параметры:
- $x –
int- $y –
int
copyArea($x, $y, $width, $height, $dx, $dy)¶Copies an area of the component by a distance specified by $dx and $dy
Параметры:
- $x –
int- $y –
int- $width –
int- $height –
int- $dx –
int- $dy –
int
create($x = null, $y = null, $w = null, $h = null)¶Create new copy Graphics from this
Параметры:
- $x –
int,null- $y –
int,null- $w –
int,null- $h –
int,nullРезультат:
dispose()¶