All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pdfjet.Line Maven / Gradle / Ivy
/* */ package com.pdfjet;
/* */
/* */ public class Line
/* */ implements Drawable
/* */ {
/* */ private float x1;
/* */ private float y1;
/* */ private float x2;
/* */ private float y2;
/* */ private float box_x;
/* */ private float box_y;
/* 48 */ private int color = 0;
/* 49 */ private float width = 0.3F;
/* 50 */ private String pattern = "[] 0";
/* 51 */ private int capStyle = 0;
/* */
/* 53 */ private String language = null;
/* 54 */ private String altDescription = " ";
/* 55 */ private String actualText = " ";
/* */
/* */ public Line()
/* */ {
/* */ }
/* */
/* */ public Line(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4)
/* */ {
/* 76 */ this.x1 = ((float)paramDouble1);
/* 77 */ this.y1 = ((float)paramDouble2);
/* 78 */ this.x2 = ((float)paramDouble3);
/* 79 */ this.y2 = ((float)paramDouble4);
/* */ }
/* */
/* */ public Line(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4)
/* */ {
/* 92 */ this.x1 = paramFloat1;
/* 93 */ this.y1 = paramFloat2;
/* 94 */ this.x2 = paramFloat3;
/* 95 */ this.y2 = paramFloat4;
/* */ }
/* */
/* */ public Line setPattern(String paramString)
/* */ {
/* 124 */ this.pattern = paramString;
/* 125 */ return this;
/* */ }
/* */
/* */ public Line setStartPoint(double paramDouble1, double paramDouble2)
/* */ {
/* 137 */ this.x1 = ((float)paramDouble1);
/* 138 */ this.y1 = ((float)paramDouble2);
/* 139 */ return this;
/* */ }
/* */
/* */ public Line setStartPoint(float paramFloat1, float paramFloat2)
/* */ {
/* 151 */ this.x1 = paramFloat1;
/* 152 */ this.y1 = paramFloat2;
/* 153 */ return this;
/* */ }
/* */
/* */ public Line setPointA(float paramFloat1, float paramFloat2)
/* */ {
/* 165 */ this.x1 = paramFloat1;
/* 166 */ this.y1 = paramFloat2;
/* 167 */ return this;
/* */ }
/* */
/* */ public Point getStartPoint()
/* */ {
/* 177 */ return new Point(this.x1, this.y1);
/* */ }
/* */
/* */ public Line setEndPoint(double paramDouble1, double paramDouble2)
/* */ {
/* 189 */ this.x2 = ((float)paramDouble1);
/* 190 */ this.y2 = ((float)paramDouble2);
/* 191 */ return this;
/* */ }
/* */
/* */ public Line setEndPoint(float paramFloat1, float paramFloat2)
/* */ {
/* 203 */ this.x2 = paramFloat1;
/* 204 */ this.y2 = paramFloat2;
/* 205 */ return this;
/* */ }
/* */
/* */ public Line setPointB(float paramFloat1, float paramFloat2)
/* */ {
/* 217 */ this.x2 = paramFloat1;
/* 218 */ this.y2 = paramFloat2;
/* 219 */ return this;
/* */ }
/* */
/* */ public Point getEndPoint()
/* */ {
/* 229 */ return new Point(this.x2, this.y2);
/* */ }
/* */
/* */ public Line setWidth(double paramDouble)
/* */ {
/* 240 */ this.width = ((float)paramDouble);
/* 241 */ return this;
/* */ }
/* */
/* */ public Line setWidth(float paramFloat)
/* */ {
/* 252 */ this.width = paramFloat;
/* 253 */ return this;
/* */ }
/* */
/* */ public Line setColor(int paramInt)
/* */ {
/* 264 */ this.color = paramInt;
/* 265 */ return this;
/* */ }
/* */
/* */ public Line setCapStyle(int paramInt)
/* */ {
/* 276 */ this.capStyle = paramInt;
/* 277 */ return this;
/* */ }
/* */
/* */ public int getCapStyle()
/* */ {
/* 287 */ return this.capStyle;
/* */ }
/* */
/* */ public Line setAltDescription(String paramString)
/* */ {
/* 298 */ this.altDescription = paramString;
/* 299 */ return this;
/* */ }
/* */
/* */ public Line setActualText(String paramString)
/* */ {
/* 310 */ this.actualText = paramString;
/* 311 */ return this;
/* */ }
/* */
/* */ public Line placeIn(Box paramBox)
/* */ throws Exception
/* */ {
/* 322 */ return placeIn(paramBox, 0.0F, 0.0F);
/* */ }
/* */
/* */ public Line placeIn(Box paramBox, double paramDouble1, double paramDouble2)
/* */ throws Exception
/* */ {
/* 338 */ placeIn(paramBox, (float)paramDouble1, (float)paramDouble2);
/* 339 */ return this;
/* */ }
/* */
/* */ public Line placeIn(Box paramBox, float paramFloat1, float paramFloat2)
/* */ throws Exception
/* */ {
/* 355 */ this.box_x = (paramBox.x + paramFloat1);
/* 356 */ this.box_y = (paramBox.y + paramFloat2);
/* 357 */ return this;
/* */ }
/* */
/* */ public Line scaleBy(double paramDouble)
/* */ throws Exception
/* */ {
/* 368 */ return scaleBy((float)paramDouble);
/* */ }
/* */
/* */ public Line scaleBy(float paramFloat)
/* */ throws Exception
/* */ {
/* 379 */ this.x1 *= paramFloat;
/* 380 */ this.x2 *= paramFloat;
/* 381 */ this.y1 *= paramFloat;
/* 382 */ this.y2 *= paramFloat;
/* 383 */ return this;
/* */ }
/* */
/* */ public float[] drawOn(Page paramPage)
/* */ throws Exception
/* */ {
/* 395 */ paramPage.setPenColor(this.color);
/* 396 */ paramPage.setPenWidth(this.width);
/* 397 */ paramPage.setLineCapStyle(this.capStyle);
/* 398 */ paramPage.setLinePattern(this.pattern);
/* 399 */ paramPage.addBMC("Span", this.language, this.altDescription, this.actualText);
/* 400 */ paramPage.drawLine(this.x1 + this.box_x, this.y1 + this.box_y, this.x2 + this.box_x, this.y2 + this.box_y);
/* */
/* 405 */ paramPage.addEMC();
/* */
/* 407 */ float f1 = Math.max(this.x1 + this.box_x, this.x2 + this.box_x);
/* 408 */ float f2 = Math.max(this.y1 + this.box_y, this.y2 + this.box_y);
/* 409 */ return new float[] { f1, f2 };
/* */ }
/* */ }
/* Location: E:\EGGWIFI\Customer\trunk\src\Workspace\Customer\Customer Maven Webapp\src\main\webapp\WEB-INF\lib\PDFjet.jar
* Qualified Name: com.pdfjet.Line
* JD-Core Version: 0.6.2
*/