- All Implemented Interfaces:
Runnable
,RTS_Drawing.Animable
Additional System class ShapeElement.
Link class ShapeElement; begin Integer COLOR,STROKE; ref(Shape) SHAPE; ! Java Class Shape is not visible in Simula ; Procedure setColor(rgb); Integer rgb; ... ... ; Procedure setStroke(size); Real size; ... ... ; Procedure drawLine(x1,y1,x2,y2); Long Real x1,y1,x2,y2; ... ... ; Procedure drawEllipse(x,y,width,height); Long Real x,y,width,height; ... ... ; Procedure drawRectangle(x,y,width,height); Long Real x,y,width,height; ... ... ; Procedure drawRoundRectangle(x,y,width,height,arcw,arch); Long Real x,y,width,height,arcw,arch; ... ... ; Procedure fillEllipse(x,y,width,height); Long Real x,y,width,height; ... ... ; Procedure fillRectangle(x,y,width,height); Long Real x,y,width,height; ... ... ; Procedure fillRoundRectangle(x,y,width,height,arcw,arch); Long Real x,y,width,height,arcw,arch; ... ... ; Procedure instantMoveTo(x,y); Long Real x,y; ... ... ; Procedure moveTo(x,y,speed); Long Real x,y,speed; ... ... ; STROKE := CURRENT_STROKE_WIDTH; into(RENDERING_SET); end;Link to GitHub: Source File.
- Author:
- Øystein Myhre Andersen
-
Nested Class Summary
Nested classes/interfaces inherited from class simula.runtime.RTS_RTObject
RTS_RTObject.ForElt, RTS_RTObject.ForList, RTS_RTObject.ForListIterator, RTS_RTObject.OperationalState, RTS_RTObject.RTS_BOOLEAN_ARRAY, RTS_RTObject.RTS_BOUNDS, RTS_RTObject.RTS_CHARACTER_ARRAY, RTS_RTObject.RTS_INTEGER_ARRAY, RTS_RTObject.RTS_LABEL, RTS_RTObject.RTS_LONG_REAL_ARRAY, RTS_RTObject.RTS_NAME<T>, RTS_RTObject.RTS_REAL_ARRAY, RTS_RTObject.RTS_REALTYPE_ARRAY, RTS_RTObject.RTS_REF_ARRAY<T>, RTS_RTObject.RTS_TEXT_ARRAY, RTS_RTObject.SingleElt<T>, RTS_RTObject.SingleTValElt, RTS_RTObject.StepUntil, RTS_RTObject.UncaughtExceptionHandler, RTS_RTObject.WhileElt<T>, RTS_RTObject.WhileTValElt
-
Field Summary
Modifier and TypeFieldDescription(package private) Color
The current draw color.(package private) final RTS_Drawing
The current drawing.(package private) Color
The current fill color.(package private) Shape
The current shape.(package private) Stroke
The current stroke.Fields inherited from class simula.runtime.RTS_Linkage
PRED, SUC
Fields inherited from class simula.runtime.RTS_ENVIRONMENT
_STARTTIME, CURRENTDECIMALMARK, CURRENTLOWTEN, EXCEPTION_HANDLER, maxint, maxlongreal, maxreal, minint, minlongreal, minreal, simulaReleaseID
Fields inherited from class simula.runtime.RTS_RTObject
_CORUT, _CTX, _CUR, _DL, _INPUT_LINELENGTH, _JTX, _OUTPUT_LINELENGTH, _SL, _STATE, _SYSIN, _SYSOUT, NOTEXT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription_STM()
Method representing the Statements in this Block
This method is virtual and must be redefined in blocks.void
drawEllipse
(double x, double y, double w, double h) Draw Ellipse.void
drawLine
(double x1, double y1, double x2, double y2) Draw Linevoid
drawRectangle
(double x, double y, double w, double h) Draw Rectangle.void
drawRoundRectangle
(double x, double y, double w, double h, double arcw, double arch) Draw Rounded Rectangle.void
fillEllipse
(double x, double y, double w, double h) Fill Ellipse.void
fillRectangle
(double x, double y, double w, double h) Fill Rectangle.void
fillRoundRectangle
(double x, double y, double w, double h, double arcw, double arch) Fill Rounded Rectangle.void
instantMoveTo
(double x, double y) Instant move.void
moveTo
(double x, double y, double speed) Rolling motion to a new position.void
paint
(Graphics2D g) Paint this Animablevoid
setColor
(int rgb) Set fill and draw color.void
setStroke
(float size) Set stroke size.Methods inherited from class simula.runtime.RTS_Linkage
pred, prev, suc
Methods inherited from class simula.runtime.RTS_BASICIO
toString
Methods inherited from class simula.runtime.RTS_ENVIRONMENT
_char, _IPOW, _IS, abs, abs, abs, addepsilon, addepsilon, arccos, arcsin, arctan, arctan2, Char, clocktime, cos, cosh, cotan, cputime, datetime, decimalmark, DEFEXCEPTION, digit, discrete, draw, edfix, edit, edit, edit, edit, edit, edtime, entier, Erlang, error, exp, getIntInfo, getTextInfo, giveIntInfo, giveTextInfo, hash, histd, histo, isochar, isorank, letter, linear, ln, loadChar, log10, lowcase, lowerbound, lowten, max, max, max, max, max, min, min, min, min, min, mod, negexp, normal, Poisson, printStaticChain, printThreadList, randint, rank, rem, rts_utility, sign, simulaid, sin, sinh, sqrt, storeChar, subepsilon, subepsilon, tan, tanh, uniform, upcase, upperbound, waitSomeTime
Methods inherited from class simula.runtime.RTS_RTObject
_ASGSTR, _ASGTXT, _GOTO, _JUMPTABLE, _JUMPTABLE, _LABEL, _PRE_LABEL, _PRE_TABLE, _SIM_LABEL, _TXTREL_EQ, _TXTREL_GE, _TXTREL_GT, _TXTREL_LE, _TXTREL_LT, _TXTREL_NE, _VALUE, arrayValue, BBLK, blanks, BPRG, call, call, CONC, copy, detach, detach, detach, doubleValue, EBLK, edObjectAttributes, edObjectIdent, floatValue, getErrorMessage, intValue, isDetachUsed, isQPSystemBlock, objectTraceIdentifier, objectTraceIdentifier, objectValue, procValue, resume, resume, resume, swapCoroutines, sysin, sysout, terminate_program, TRACE_GOTO, TRF_EQ, TRF_NE
-
Field Details
-
Constructor Details
-
RTS_ShapeElement
Create a new _ShapeElement.- Parameters:
SL
- staticLink
-
-
Method Details
-
_STM
Description copied from class:RTS_RTObject
Method representing the Statements in this Block
This method is virtual and must be redefined in blocks. -
drawLine
public void drawLine(double x1, double y1, double x2, double y2) Draw Line- Parameters:
x1
- the X coordinate of the start pointy1
- the Y coordinate of the start pointx2
- the X coordinate of the end pointy2
- the Y coordinate of the end point
-
drawEllipse
public void drawEllipse(double x, double y, double w, double h) Draw Ellipse.- Parameters:
x
- the X coordinatey
- the Y coordinatew
- the width of the ellipseh
- the height of the ellipse
-
drawRectangle
public void drawRectangle(double x, double y, double w, double h) Draw Rectangle.- Parameters:
x
- the X coordinatey
- the Y coordinatew
- the width of the rectangleh
- the height of the rectangle
-
drawRoundRectangle
public void drawRoundRectangle(double x, double y, double w, double h, double arcw, double arch) Draw Rounded Rectangle.- Parameters:
x
- the X coordinatey
- the Y coordinatew
- the width of the rectangleh
- the height of the rectanglearcw
- the width of the arc to use to round off the cornersarch
- the height of the arc to use to round off the corners
-
fillEllipse
public void fillEllipse(double x, double y, double w, double h) Fill Ellipse.- Parameters:
x
- the X coordinatey
- the Y coordinatew
- the width of the ellipseh
- the height of the ellipse
-
fillRectangle
public void fillRectangle(double x, double y, double w, double h) Fill Rectangle.- Parameters:
x
- the X coordinatey
- the Y coordinatew
- the width of the rectangleh
- the height of the rectangle
-
fillRoundRectangle
public void fillRoundRectangle(double x, double y, double w, double h, double arcw, double arch) Fill Rounded Rectangle.- Parameters:
x
- the X coordinatey
- the Y coordinatew
- the width of the rectangleh
- the height of the rectanglearcw
- the width of the arc to use to round off the cornersarch
- the height of the arc to use to round off the corners
-
setColor
public void setColor(int rgb) Set fill and draw color.- Parameters:
rgb
- the new fill and draw color.
-
setStroke
public void setStroke(float size) Set stroke size.- Parameters:
size
- the new stroke size.
-
instantMoveTo
public void instantMoveTo(double x, double y) Instant move.- Parameters:
x
- the X coordinatey
- the Y coordinate
-
moveTo
public void moveTo(double x, double y, double speed) Rolling motion to a new position.- Parameters:
x
- the X coordinatey
- the Y coordinatespeed
- pixels per milli-second
-
paint
Description copied from interface:RTS_Drawing.Animable
Paint this Animable- Specified by:
paint
in interfaceRTS_Drawing.Animable
- Parameters:
g
- the graphic context
-