Package wprover
Class Cedmark
- java.lang.Object
-
- wprover.CClass
-
- wprover.Cedmark
-
public class Cedmark extends CClass
Represents a Cedmark object, which is a type of equality mark in a geometric drawing. It extends the CClass class and provides methods for drawing and saving the equality mark.
-
-
Constructor Summary
Constructors Constructor Description Cedmark()Default constructor for Cedmark.Cedmark(CPoint pp1, CPoint pp2)Constructs a Cedmark object with the specified points.Cedmark(CPoint pp1, CPoint pp2, int d)Constructs a Cedmark object with the specified points and number of marks.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddraw(java.awt.Graphics2D g2)Draws the equality mark using the given Graphics2D object.voiddrawALine(double x, double y, double dx, double dy, java.awt.Graphics2D g2)Draws a line for the equality mark.java.lang.StringgetDescription()Gets the description of the equality mark.intgetLength()Gets the length of the equality mark.intgetNum()Gets the number of equality marks.voidLoad(java.io.DataInputStream in, DrawProcess dp)Loads the equality mark data from an input stream.voidSave(java.io.DataOutputStream out)Saves the equality mark data to an output stream.voidSavePS(java.io.FileOutputStream fp, int stype)Saves the equality mark to a PostScript file.voidsavePsLine(double x, double y, double dx, double dy, java.io.FileOutputStream fp)Saves the equality mark line to a PostScript file.voidsetdnum(int d)Sets the number of equality marks.voidsetLength(int n)Sets the length of the equality mark.voidsetNum(int n)Sets the number of equality marks.java.lang.StringTypeString()Gets the type string of the equality mark.-
Methods inherited from class wprover.CClass
copy, get_type, getColor, getColorIndex, getname, getPSLineString, hasNameSet, isdraw, saveSuper, saveSuperColor, setAttr, setAttrAux, setColor, setDash, setInFlashing, setWidth, stopFlash, toString, visible
-
-
-
-
Method Detail
-
getLength
public int getLength()
Gets the length of the equality mark.- Returns:
- the length of the equality mark
-
setLength
public void setLength(int n)
Sets the length of the equality mark.- Parameters:
n- the length to set
-
getNum
public int getNum()
Gets the number of equality marks.- Returns:
- the number of equality marks
-
setNum
public void setNum(int n)
Sets the number of equality marks.- Parameters:
n- the number to set
-
setdnum
public void setdnum(int d)
Sets the number of equality marks.- Parameters:
d- the number of marks to set
-
TypeString
public java.lang.String TypeString()
Gets the type string of the equality mark.- Specified by:
TypeStringin classCClass- Returns:
- the type string of the equality mark
-
getDescription
public java.lang.String getDescription()
Gets the description of the equality mark.- Specified by:
getDescriptionin classCClass- Returns:
- the description of the equality mark
-
draw
public void draw(java.awt.Graphics2D g2)
Draws the equality mark using the given Graphics2D object.
-
drawALine
public void drawALine(double x, double y, double dx, double dy, java.awt.Graphics2D g2)Draws a line for the equality mark.- Parameters:
x- the x-coordinate of the start pointy- the y-coordinate of the start pointdx- the x-directiondy- the y-directiong2- the Graphics2D object
-
savePsLine
public void savePsLine(double x, double y, double dx, double dy, java.io.FileOutputStream fp) throws java.io.IOExceptionSaves the equality mark line to a PostScript file.- Parameters:
x- the x-coordinate of the start pointy- the y-coordinate of the start pointdx- the x-directiondy- the y-directionfp- the file output stream- Throws:
java.io.IOException- if an I/O error occurs
-
SavePS
public void SavePS(java.io.FileOutputStream fp, int stype) throws java.io.IOExceptionSaves the equality mark to a PostScript file.
-
Save
public void Save(java.io.DataOutputStream out) throws java.io.IOExceptionSaves the equality mark data to an output stream.
-
Load
public void Load(java.io.DataInputStream in, DrawProcess dp) throws java.io.IOExceptionLoads the equality mark data from an input stream.
-
-