| |
---|
| | @Path("/gallery") |
---|
| | public class StrokesRest { |
---|
| | private Position Position = new Position(); |
---|
| | private ArrayList<Position> positions = new ArrayList<>(); |
---|
| | private Stroke Test = new Stroke(); |
---|
| | private ArrayList<Stroke> strokes = new ArrayList<>(); |
---|
| | private Gallery gallery = Gallery.getInstance(); |
---|
| | |
---|
| | /* |
---|
| | * 1ページの1レイヤーに置ける筆跡情報を全て取得します。 |
---|
| |
---|
| | */ |
---|
| | @Path("/{aid}/pageMap/0/layers/0/strokes") |
---|
| | @GET |
---|
| | @Produces(MediaType.APPLICATION_JSON) |
---|
| | public Stroke getStrokeRest(@PathParam("aid") Integer aid) { |
---|
| | public ArrayList<Stroke> getStrokeRest(@PathParam("aid") Integer aid) { |
---|
| | var animation = gallery.getAnimationInformation(aid); |
---|
| | return this.Test; |
---|
| | return this.strokes; |
---|
| | // if(animation != null) { |
---|
| | // return this.Test; |
---|
| | // }else{ |
---|
| | // throw new WebApplicationException(401); |
---|
| |
---|
| | @Produces(MediaType.APPLICATION_JSON) |
---|
| | public void addStrokes(@PathParam("aid") Integer aid, @FormParam("uid") Integer uid, @FormParam("uidToken") Integer uidToken, |
---|
| | @FormParam("pen") Integer pen, @FormParam("color") Integer color, @FormParam("thick") Integer thick) { |
---|
| | var animation = gallery.getAnimationInformation(aid); |
---|
| | this.Test.setStrokes(pen, color, thick); |
---|
| | Stroke Test = new Stroke(); |
---|
| | Test.addStrokes(pen, color, thick); |
---|
| | Test.addStrokeNo();//strokeNoを+1する |
---|
| | this.strokes.add(Test); |
---|
| | // if(animation != null) { |
---|
| | // this.Test.setStrokes(pen, color, thick); |
---|
| | // }else{ |
---|
| | // throw new WebApplicationException(401); |
---|
| |
---|
| | |
確認お願いします。
strokeNo, pen, color, thick
LGTM
8f262e6
intomaster
fromakagi05/25
on 28 May 2021akagi05/25
branch on 28 May 2021