package com.lemenzo.gallery.editor;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/** Immutable-ish normalized annotation record for local markup/redaction. */
public final class EditorAnnotation implements Serializable {
    private static final long serialVersionUID = 1L;
    public static final int TYPE_STROKE = 1;
    public static final int TYPE_REDACTION = 2;
    public static final int TYPE_TEXT = 3;

    public final int type;
    public final ArrayList<Float> points;
    public final String text;

    public EditorAnnotation(int type, List<Float> points, String text) {
        this.type = type;
        this.points = new ArrayList<>(points == null ? new ArrayList<>() : points);
        this.text = text;
    }

    public EditorAnnotation(EditorAnnotation other) {
        this(other.type, other.points, other.text);
    }
}
