Skip to content
This repository was archived by the owner on Jul 26, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
<dependency>
<groupId>com.groupdocs</groupId>
<artifactId>groupdocs-annotation</artifactId>
<version>19.7</version>
<version>21.7</version>
<type>jar</type>
</dependency>
<dependency>
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,31 +1,23 @@
package com.groupdocs.ui.annotation.annotator;

import com.groupdocs.annotation.domain.AnnotationInfo;
import com.groupdocs.annotation.domain.PageData;
import com.groupdocs.annotation.domain.Rectangle;
import com.groupdocs.annotation.models.PageInfo;
import com.groupdocs.annotation.models.Point;
import com.groupdocs.ui.annotation.entity.web.AnnotationDataEntity;
import org.springframework.util.StringUtils;
import java.util.ArrayList;
import java.util.List;

import java.text.ParseException;
public abstract class AbstractTextAnnotator extends BaseAnnotator {

public abstract class AbstractTextAnnotator extends Annotator {

public AbstractTextAnnotator(AnnotationDataEntity annotationData, PageData pageData) {
super(annotationData, pageData);
}

@Override
protected AnnotationInfo initAnnotationInfo() throws ParseException {
AnnotationInfo annotationInfo = super.initAnnotationInfo();
annotationInfo.setFieldText(annotationData.getText());
annotationInfo.setFontFamily(StringUtils.capitalize(annotationData.getFont()));
annotationInfo.setFontSize(annotationData.getFontSize());
annotationInfo.setFontColor(annotationData.getFontColor());
return annotationInfo;
protected AbstractTextAnnotator(AnnotationDataEntity annotationData, PageInfo pageInfo) {
super(annotationData, pageInfo);
}

@Override
protected Rectangle getBox() {
return new Rectangle(annotationData.getLeft(), annotationData.getTop(), annotationData.getWidth(), annotationData.getHeight());
protected static java.util.List<Point> getPoints(AnnotationDataEntity annotationData, PageInfo pageInfo) {
List<Point> tmp0 = new ArrayList<>();
tmp0.add(new Point(annotationData.getLeft(), pageInfo.getHeight() - annotationData.getTop()));
tmp0.add(new Point(annotationData.getLeft()+ annotationData.getWidth(), pageInfo.getHeight() - annotationData.getTop()));
tmp0.add(new Point(annotationData.getLeft(), pageInfo.getHeight() - annotationData.getTop()- annotationData.getHeight()));
tmp0.add(new Point(annotationData.getLeft()+ annotationData.getWidth(), pageInfo.getHeight() - annotationData.getTop()- annotationData.getHeight()));
return tmp0;
}
}
}
188 changes: 0 additions & 188 deletions src/main/java/com/groupdocs/ui/annotation/annotator/Annotator.java

This file was deleted.

Loading