DrawingWand class

A DrawingWand is a wand that contains vector drawing methods.

For example you can apply the DrawingWand to a MagickWand using MagickDrawImage method from MagickWand class.

Create a new DrawingWand object with newDrawingWand.

Dispose of a DrawingWand object with destroyDrawingWand.

Constructors

DrawingWand.newDrawingWand()
NewDrawingWand() returns a drawing wand required for all other methods in the API.
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearDrawingWand() → void
ClearDrawingWand() clears resources associated with the drawing wand.
cloneDrawingWand() DrawingWand
CloneDrawingWand() makes an exact copy of the specified wand.
destroyDrawingWand() → void
DestroyDrawingWand() disposes the drawing wand.
drawAffine(AffineMatrix affineMatrix) → void
DrawAffine() adjusts the current affine transformation matrix with the specified affine transformation matrix. Note that the current affine transform is adjusted rather than replaced.
drawAlpha({required double x, required double y, required PaintMethod paintMethod}) → void
DrawAlpha() paints on the image's alpha channel in order to set effected pixels to transparent. The available paint methods are:
drawAnnotation({required double x, required double y, required String text}) → void
DrawAnnotation() draws text on the image.
drawArc({required double sx, required double sy, required double ex, required double ey, required double sd, required double ed}) → void
DrawArc() draws an arc falling within a specified bounding rectangle on the image.
drawBezier(List<PointInfo> coordinates) → void
DrawBezier() draws a bezier curve through a set of points on the image.
drawCircle({required double ox, required double oy, required double px, required double py}) → void
DrawCircle() draws a circle on the image.
drawClearException() bool
DrawClearException() clear any exceptions associated with the wand.
drawColor({required double x, required double y, required PaintMethod paintMethod}) → void
DrawColor() draws color on image using the current fill color, starting at specified position, and using specified paint method. The available paint methods are:
drawComment(String comment) → void
DrawComment() adds a comment to a vector output stream.
drawComposite({required CompositeOperator compose, required double x, required double y, required double width, required double height, required MagickWand magickWand}) Future<void>
DrawComposite() composites an image onto the current image, using the specified composition operator, specified position, and at the specified size.
drawEllipse({required double ox, required double oy, required double rx, required double ry, required double start, required double end}) → void
DrawEllipse() draws an ellipse on the image.
drawGetBorderColor(PixelWand pixelWand) → void
DrawGetBorderColor() returns the border color used for drawing bordered objects.
drawGetClipPath() String?
DrawGetClipPath() obtains the current clipping path ID. The value returned must be deallocated by the user when it is no longer needed.
drawGetClipRule() FillRule
DrawGetClipRule() returns the current polygon fill rule to be used by the clipping path.
drawGetClipUnits() ClipPathUnits
DrawGetClipUnits() returns the interpretation of clip path units.
drawGetDensity() String?
DrawGetDensity() obtains the vertical and horizontal resolution.
drawGetException() DrawGetExceptionResult
DrawGetException() returns the severity, reason, and description of any error that occurs when using other methods in this API.
drawGetExceptionType() ExceptionType
DrawGetExceptionType() returns the exception type associated with the wand. If no exception has occurred, ExceptionType.undefined is returned.
drawGetFillColor(PixelWand pixelWand) → void
DrawGetFillColor() returns the fill color used for drawing filled objects.
drawGetFillOpacity() double
DrawGetFillOpacity() returns the alpha used when drawing using the fill color or fill texture. Fully opaque is 1.0.
drawGetFillRule() FillRule
DrawGetFillRule() returns the fill rule used while drawing polygons.
drawGetFont() String?
DrawGetFont() returns a string specifying the font used when annotating with text.
drawGetFontFamily() String?
DrawGetFontFamily() returns the font family to use when annotating with text.
drawGetFontResolution() DrawGetFontResolutionResult?
DrawGetFontResolution() gets the image X and Y resolution.
drawGetFontSize() double
DrawGetFontSize() returns the font pointsize used when annotating with text.
drawGetFontStretch() StretchType
DrawGetFontStretch() returns the font stretch used when annotating with text.
drawGetFontStyle() StyleType
DrawGetFontStyle() returns the font style used when annotating with text.
drawGetFontWeight() int
DrawGetFontWeight() returns the font weight used when annotating with text.
drawGetGravity() GravityType
DrawGetGravity() returns the text placement gravity used when annotating with text.
drawGetOpacity() double
DrawGetOpacity() returns the alpha used when drawing with the fill or stroke color or texture. Fully opaque is 1.0.
drawGetStrokeAntialias() bool
DrawGetStrokeAntialias() returns the current stroke antialias setting. Stroked outlines are antialiased by default. When antialiasing is disabled stroked pixels are thresholded to determine if the stroke color or underlying canvas color should be used.
drawGetStrokeColor(PixelWand strokeColor) → void
DrawGetStrokeColor() returns the color used for stroking object outlines.
drawGetStrokeDashArray() Float64List?
DrawGetStrokeDashArray() returns an array representing the pattern of dashes and gaps used to stroke paths (see DrawSetStrokeDashArray)
drawGetStrokeDashOffset() double
DrawGetStrokeDashOffset() returns the offset into the dash pattern to start the dash.
drawGetStrokeLineCap() LineCap
DrawGetStrokeLineCap() returns the shape to be used at the end of open subpaths when they are stroked. Values of LineCap are UndefinedCap, ButtCap, RoundCap, and SquareCap.
drawGetStrokeLineJoin() LineJoin
DrawGetStrokeLineJoin() returns the shape to be used at the corners of paths (or other vector shapes) when they are stroked. Values of LineJoin are UndefinedJoin, MiterJoin, RoundJoin, and BevelJoin.
drawGetStrokeMiterLimit() int
DrawGetStrokeMiterLimit() returns the miter limit. When two line segments meet at a sharp angle and miter joins have been specified for 'lineJoin', it is possible for the miter to extend far beyond the thickness of the line stroking the path. The miterLimit' imposes a limit on the ratio of the miter length to the 'lineWidth'.
drawGetStrokeOpacity() double
DrawGetStrokeOpacity() returns the alpha of stroked object outlines.
drawGetStrokeWidth() double
DrawGetStrokeWidth() returns the width of the stroke used to draw object outlines.
drawGetTextAlignment() AlignType
DrawGetTextAlignment() returns the alignment applied when annotating with text.
drawGetTextAntiAlias() bool
DrawGetTextAntialias() returns the current text antialias setting, which determines whether text is antialiased. Text is antialiased by default.
drawGetTextDecoration() DecorationType
DrawGetTextDecoration() returns the decoration applied when annotating with text.
drawGetTextDirection() DirectionType
DrawGetTextDirection() returns the direction that will be used when annotating with text.
drawGetTextEncoding() String?
DrawGetTextEncoding() returns a null-terminated string which specifies the code set used for text annotations. The string must be freed by the user once it is no longer required.
drawGetTextInterlineSpacing() double
DrawGetTextInterlineSpacing() gets the spacing between lines in text.
drawGetTextInterwordSpacing() double
DrawGetTextInterwordSpacing() gets the spacing between words in text.
drawGetTextKerning() double
DrawGetTextKerning() gets the spacing between characters in text.
drawGetTextUnderColor(PixelWand pixelWand) → void
DrawGetTextUnderColor() returns the color of a background rectangle to place under text annotations.
drawGetTypeMetrics({required String text, required bool ignoreNewlines}) Future<TypeMetric?>
DrawGetTypeMetrics() returns the following information for the specified font and text:
drawGetVectorGraphics() Future<String?>
DrawGetVectorGraphics() returns a string which specifies the vector graphics generated by any graphics calls made since the wand was instantiated.
drawLine({required double sx, required double sy, required double ex, required double ey}) → void
DrawLine() draws a line on the image using the current stroke color, stroke alpha, and stroke width.
drawPathClose() → void
DrawPathClose() adds a path element to the current path which closes the current subpath by drawing a straight line from the current point to the current subpath's most recent starting point (usually, the most recent moveto point).
drawPathCurveToAbsolute({required double x1, required double y1, required double x2, required double y2, required double x, required double y}) → void
DrawPathCurveToAbsolute() draws a cubic Bezier curve from the current point to (x,y) using (x1,y1) as the control point at the beginning of the curve and (x2,y2) as the control point at the end of the curve using absolute coordinates. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.
drawPathCurveToQuadraticBezierAbsolute({required double x1, required double y1, required double x, required double y}) → void
DrawPathCurveToQuadraticBezierAbsolute() draws a quadratic Bezier curve from the current point to (x,y) using (x1,y1) as the control point using absolute coordinates. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.
drawPathCurveToQuadraticBezierRelative({required double x1, required double y1, required double x, required double y}) → void
DrawPathCurveToQuadraticBezierRelative() draws a quadratic Bezier curve from the current point to (x,y) using (x1,y1) as the control point using relative coordinates. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.
drawPathCurveToQuadraticBezierSmoothAbsolute({required double x, required double y}) → void
DrawPathCurveToQuadraticBezierSmoothAbsolute() draws a quadratic Bezier curve (using absolute coordinates) from the current point to (x,y). The control point is assumed to be the reflection of the control point on the previous command relative to the current point. (If there is no previous command or if the previous command was not a DrawPathCurveToQuadraticBezierAbsolute, DrawPathCurveToQuadraticBezierRelative, DrawPathCurveToQuadraticBezierSmoothAbsolute or DrawPathCurveToQuadraticBezierSmoothRelative, assume the control point is coincident with the current point.). At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.
drawPathCurveToQuadraticBezierSmoothRelative({required double x, required double y}) → void
DrawPathCurveToQuadraticBezierSmoothRelative() draws a quadratic Bezier curve (using relative coordinates) from the current point to (x,y). The control point is assumed to be the reflection of the control point on the previous command relative to the current point. (If there is no previous command or if the previous command was not a DrawPathCurveToQuadraticBezierAbsolute, DrawPathCurveToQuadraticBezierRelative, DrawPathCurveToQuadraticBezierSmoothAbsolute or DrawPathCurveToQuadraticBezierSmoothRelative, assume the control point is coincident with the current point.). At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.
drawPathCurveToRelative({required double x1, required double y1, required double x2, required double y2, required double x, required double y}) → void
DrawPathCurveToRelative() draws a cubic Bezier curve from the current point to (x,y) using (x1,y1) as the control point at the beginning of the curve and (x2,y2) as the control point at the end of the curve using relative coordinates. At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.
drawPathCurveToSmoothAbsolute({required double x2, required double y2, required double x, required double y}) → void
DrawPathCurveToSmoothAbsolute() draws a cubic Bezier curve from the current point to (x,y) using absolute coordinates. The first control point is assumed to be the reflection of the second control point on the previous command relative to the current point. (If there is no previous command or if the previous command was not an DrawPathCurveToAbsolute, DrawPathCurveToRelative, DrawPathCurveToSmoothAbsolute or DrawPathCurveToSmoothRelative, assume the first control point is coincident with the current point.) (x2,y2) is the second control point (i.e., the control point at the end of the curve). At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.
drawPathCurveToSmoothRelative({required double x2, required double y2, required double x, required double y}) → void
DrawPathCurveToSmoothRelative() draws a cubic Bezier curve from the current point to (x,y) using relative coordinates. The first control point is assumed to be the reflection of the second control point on the previous command relative to the current point. (If there is no previous command or if the previous command was not an DrawPathCurveToAbsolute, DrawPathCurveToRelative, DrawPathCurveToSmoothAbsolute or DrawPathCurveToSmoothRelative, assume the first control point is coincident with the current point.) (x2,y2) is the second control point (i.e., the control point at the end of the curve). At the end of the command, the new current point becomes the final (x,y) coordinate pair used in the polybezier.
drawPathEllipticArcAbsolute({required double rx, required double ry, required double xAxisRotation, required bool largeArcFlag, required bool sweepFlag, required double x, required double y}) → void
DrawPathEllipticArcAbsolute() draws an elliptical arc from the current point to (x, y) using absolute coordinates. The size and orientation of the ellipse are defined by two radii (rx, ry) and an xAxisRotation, which indicates how the ellipse as a whole is rotated relative to the current coordinate system. The center (cx, cy) of the ellipse is calculated automagically to satisfy the constraints imposed by the other parameters. largeArcFlag and sweepFlag contribute to the automatic calculations and help determine how the arc is drawn. If largeArcFlag is true then draw the larger of the available arcs. If sweepFlag is true, then draw the arc matching a clock-wise rotation.
drawPathEllipticArcRelative({required double rx, required double ry, required double xAxisRotation, required bool largeArcFlag, required bool sweepFlag, required double x, required double y}) → void
DrawPathEllipticArcRelative() draws an elliptical arc from the current point to (x, y) using relative coordinates. The size and orientation of the ellipse are defined by two radii (rx, ry) and an xAxisRotation, which indicates how the ellipse as a whole is rotated relative to the current coordinate system. The center (cx, cy) of the ellipse is calculated automagically to satisfy the constraints imposed by the other parameters. largeArcFlag and sweepFlag contribute to the automatic calculations and help determine how the arc is drawn. If largeArcFlag is true then draw the larger of the available arcs. If sweepFlag is true, then draw the arc matching a clock-wise rotation.
drawPathFinish() → void
DrawPathFinish() terminates the current path.
drawPathLineToAbsolute({required double x, required double y}) → void
DrawPathLineToAbsolute() draws a line path from the current point to the given coordinate using absolute coordinates. The coordinate then becomes the new current point.
drawPathLineToHorizontalAbsolute({required double x}) → void
DrawPathLineToHorizontalAbsolute() draws a horizontal line path from the current point to the target point using absolute coordinates. The target point then becomes the new current point.
drawPathLineToHorizontalRelative(double x) → void
DrawPathLineToHorizontalRelative() draws a horizontal line path from the current point to the target point using relative coordinates. The target point then becomes the new current point.
drawPathLineToRelative({required double x, required double y}) → void
DrawPathLineToRelative() draws a line path from the current point to the given coordinate using relative coordinates. The coordinate then becomes the new current point.
drawPathLineToVerticalAbsolute(double y) → void
DrawPathLineToVerticalAbsolute() draws a vertical line path from the current point to the target point using absolute coordinates. The target point then becomes the new current point.
drawPathLineToVerticalRelative(double y) → void
DrawPathLineToVerticalRelative() draws a vertical line path from the current point to the target point using relative coordinates. The target point then becomes the new current point.
drawPathMoveToAbsolute({required double x, required double y}) → void
DrawPathMoveToAbsolute() starts a new sub-path at the given coordinate using absolute coordinates. The current point then becomes the specified coordinate.
drawPathMoveToRelative({required double x, required double y}) → void
DrawPathMoveToRelative() starts a new sub-path at the given coordinate using relative coordinates. The current point then becomes the specified coordinate.
drawPathStart() → void
DrawPathStart() declares the start of a path drawing list which is terminated by a matching DrawPathFinish() command. All other DrawPath commands must be enclosed between a DrawPathStart() and a DrawPathFinish() command. This is because path drawing commands are subordinate commands and they do not function by themselves.
drawPoint({required double x, required double y}) → void
DrawPoint() draws a point using the current fill color.
drawPolygon(List<PointInfo> coordinates) → void
DrawPolygon() draws a polygon using the current stroke, stroke width, and fill color or texture, using the specified array of coordinates.
drawPolyline(List<PointInfo> coordinates) → void
DrawPolyline() draws a polyline using the current stroke, stroke width, and fill color or texture, using the specified array of coordinates.
drawPopClipPath() → void
DrawPopClipPath() terminates a clip path definition.
drawPopDefs() → void
DrawPopDefs() terminates a definition list.
drawPopPattern() → void
DrawPopPattern() terminates a pattern definition.
drawPushClipPath(String clipMaskId) → void
DrawPushClipPath() starts a clip path definition which is comprized of any number of drawing commands and terminated by a DrawPopClipPath() command.
drawPushDefs() → void
DrawPushDefs() indicates that commands up to a terminating DrawPopDefs() command create named elements (e.g. clip-paths, textures, etc.) which may safely be processed earlier for the sake of efficiency.
drawPushPattern({required String patternId, required double x, required double y, required double width, required double height}) bool
DrawPushPattern() indicates that subsequent commands up to a DrawPopPattern() command comprise the definition of a named pattern. The pattern space is assigned top left corner coordinates, a width and height, and becomes its own drawing space. Anything which can be drawn may be used in a pattern definition. Named patterns may be used as stroke or brush definitions.
drawRectangle({required double x1, required double y1, required double x2, required double y2}) → void
DrawRectangle() draws a rectangle given two coordinates and using the current stroke, stroke width, and fill settings.
drawResetVectorGraphics() → void
DrawResetVectorGraphics() resets the vector graphics associated with the specified wand.
drawRotate(double degrees) → void
DrawRotate() applies the specified rotation to the current coordinate space.
drawRoundRectangle({required double x1, required double y1, required double x2, required double y2, required double rx, required double ry}) → void
DrawRoundRectangle() draws a rounded rectangle given two coordinates, x & y corner radiuses and using the current stroke, stroke width, and fill settings.
drawScale({required double x, required double y}) → void
DrawScale() adjusts the scaling factor to apply in the horizontal and vertical directions to the current coordinate space.
drawSetBorderColor(PixelWand borderColor) → void
DrawSetBorderColor() sets the border color to be used for drawing bordered objects.
drawSetClipPath(String clipMaskId) bool
DrawSetClipPath() associates a named clipping path with the image. Only the areas drawn on by the clipping path will be modified as ssize_t as it remains in effect.
drawSetClipRule(FillRule fillRule) → void
DrawSetClipRule() set the polygon fill rule to be used by the clipping path.
drawSetClipUnits(ClipPathUnits clipUnits) → void
DrawSetClipUnits() sets the interpretation of clip path units.
drawSetDensity(String density) bool
DrawSetDensity() sets the vertical and horizontal resolution.
drawSetFillColor(PixelWand fillColor) → void
DrawSetFillColor() sets the fill color to be used for drawing filled objects.
drawSetFillOpacity(double fillOpacity) → void
DrawSetFillOpacity() sets the alpha to use when drawing using the fill color or fill texture. Fully opaque is 1.0.
drawSetFillRule(FillRule fillRule) → void
DrawSetFillRule() sets the fill rule to use while drawing polygons.
drawSetFont(String fontName) bool
DrawSetFont() sets the fully-specified font to use when annotating with text.
drawSetFontFamily(String fontFamily) bool
DrawSetFontFamily() sets the font family to use when annotating with text.
drawSetFontResolution({required double xResolution, required double yResolution}) bool
DrawSetFontResolution() sets the image resolution.
drawSetFontSize(double pointSize) → void
DrawSetFontSize() sets the font pointsize to use when annotating with text.
drawSetFontStretch(StretchType fontStretch) → void
DrawSetFontStretch() sets the font stretch to use when annotating with text.
drawSetFontStyle(StyleType fontStyle) → void
DrawSetFontStyle() sets the font style to use when annotating with text.
drawSetFontWeight(int fontWeight) → void
DrawSetFontWeight() sets the font weight to use when annotating with text.
drawSetGravity(GravityType gravity) → void
DrawSetGravity() sets the text placement gravity to use when annotating with text.
drawSetOpacity(double opacity) → void
DrawSetOpacity() sets the alpha to use when drawing using the fill or stroke color or texture. Fully opaque is 1.0.
drawSetStrokeAntialias(bool strokeAntialias) → void
DrawSetStrokeAntialias() controls whether stroked outlines are antialiased. Stroked outlines are antialiased by default. When antialiasing is disabled stroked pixels are thresholded to determine if the stroke color or underlying canvas color should be used.
drawSetStrokeColor(PixelWand strokeWand) → void
DrawSetStrokeColor() sets the color used for stroking object outlines.
drawSetStrokeDashArray(Float64List? dashArray) → void
DrawSetStrokeDashArray() specifies the pattern of dashes and gaps used to stroke paths. The stroke dash array represents an array of numbers that specify the lengths of alternating dashes and gaps in pixels. If an odd number of values is provided, then the list of values is repeated to yield an even number of values. To remove an existing dash array, pass a null dasharray. A typical stroke dash array might contain the members 5 3 2.
drawSetStrokeDashOffset(double dashOffset) → void
DrawSetStrokeDashOffset() specifies the offset into the dash pattern to start the dash.
drawSetStrokeLineCap(LineCap lineCap) → void
DrawSetStrokeLineCap() specifies the shape to be used at the end of open subpaths when they are stroked.
drawSetStrokeLineJoin(LineJoin lineJoin) → void
DrawSetStrokeLineJoin() specifies the shape to be used at the corners of paths (or other vector shapes) when they are stroked.
drawSetStrokeMiterLimit(int miterLimit) → void
DrawSetStrokeMiterLimit() specifies the miter limit. When two line segments meet at a sharp angle and miter joins have been specified for 'lineJoin', it is possible for the miter to extend far beyond the thickness of the line stroking the path. The miterLimit' imposes a limit on the ratio of the miter length to the 'lineWidth'.
drawSetStrokeOpacity(double opacity) → void
DrawSetStrokeOpacity() specifies the alpha of stroked object outlines.
drawSetStrokeWidth(double strokeWidth) → void
DrawSetStrokeWidth() sets the width of the stroke used to draw object outlines.
drawSetTextAlignment(AlignType alignment) → void
DrawSetTextAlignment() specifies a text alignment to be applied when annotating with text.
drawSetTextAntialias(bool textAntialias) → void
DrawSetTextAntialias() controls whether text is antialiased. Text is antialiased by default.
drawSetTextDecoration(DecorationType decoration) → void
DrawSetTextDecoration() specifies a decoration to be applied when annotating with text.
drawSetTextDirection(DirectionType direction) → void
DrawSetTextDirection() specifies the direction to be used when annotating with text.
drawSetTextEncoding(String encoding) → void
DrawSetTextEncoding() specifies the code set to use for text annotations. The only character encoding which may be specified at this time is "UTF-8" for representing Unicode as a sequence of bytes. Specify an empty string to set text encoding to the system's default. Successful text annotation using Unicode may require fonts designed to support Unicode.
drawSetTextInterlineSpacing(double interlineSpacing) → void
  • interlineSpacing : text line spacing
  • drawSetTextInterwordSpacing(double interwordSpacing) → void
    DrawSetTextInterwordSpacing() sets the spacing between words in text.
    drawSetTextKerning(double kerning) → void
    DrawSetTextKerning() sets the spacing between characters in text.
    drawSetTextUnderColor(PixelWand underWand) → void
    DrawSetTextUnderColor() specifies the color of a background rectangle to place under text annotations.
    drawSetVectorGraphics(String xml) Future<void>
    DrawSetVectorGraphics() sets the vector graphics associated with the specified wand. Use this method with DrawGetVectorGraphics() as a method to persist the vector graphics state.
    drawSetViewbox(double x1, double y1, double x2, double y2) → void
    DrawSetViewbox() sets the overall canvas size to be recorded with the drawing vector data. Usually this will be specified using the same size as the canvas image. When the vector data is saved to SVG or MVG formats, the viewbox is use to specify the size of the canvas image that a viewer will render the vector data on.
    drawSkewX(double degrees) → void
    DrawSkewX() skews the current coordinate system in the horizontal direction.
    drawSkewY(double degrees) → void
    DrawSkewY() skews the current coordinate system in the vertical direction.
    drawTranslate(double x, double y) → void
    DrawTranslate() applies a translation to the current coordinate system which moves the coordinate system origin to the specified coordinate.
    isDrawingWand() bool
    IsDrawingWand() returns true if the wand is verified as a drawing wand.
    noSuchMethod(Invocation invocation) → dynamic
    Invoked when a nonexistent method or property is accessed.
    inherited
    popDrawingWand() bool
    PopDrawingWand() destroys the current drawing wand and returns to the previously pushed drawing wand. Multiple drawing wands may exist. It is an error to attempt to pop more drawing wands than have been pushed, and it is proper form to pop all drawing wands which have been pushed.
    pushDrawingWand() bool
    PushDrawingWand() clones the current drawing wand to create a new drawing wand. The original drawing wand(s) may be returned to by invoking PopDrawingWand(). The drawing wands are stored on a drawing wand stack. For every Pop there must have already been an equivalent Push.
    toString() String
    A string representation of this object.
    inherited

    Operators

    operator ==(Object other) bool
    The equality operator.
    override