| |
---|
| | private ScheduledThreadPoolExecutor thread = new ScheduledThreadPoolExecutor(1); |
---|
| | private ArrayList<Double>positionLocalx = new ArrayList<>(); |
---|
| | private ArrayList<Double>positionLocaly = new ArrayList<>(); |
---|
| | private ArrayList<Integer>localstrokeNo = new ArrayList<>(); |
---|
| | private ArrayList<Double>positionLocalx2 = new ArrayList<>(); |
---|
| | private ArrayList<Double>positionLocaly2 = new ArrayList<>(); |
---|
| | private ArrayList<Integer>localstrokeNo2 = new ArrayList<>(); |
---|
| | private int cnt=0; |
---|
| | private float fsx=0; |
---|
| | private float fsy=0; |
---|
| | //----------------------------------------------------------------- |
---|
| | // getter |
---|
| | public MutableLiveData<Collection<Stroke>> getStroke() { |
---|
| | return this.mStrokes; |
---|
| |
---|
| | } |
---|
| | |
---|
| | //----------------------------------------------------------------- |
---|
| | // 描画APIの通信リクエスト |
---|
| | public void addLocalStrokeRequest() { |
---|
| | public void addLocalStrokeRequest(float x,float y) { |
---|
| | paintModelContainer.getPaintConnectionModel().addLocalStroke(mStrokeNo); |
---|
| | fsx=x; |
---|
| | fsy=y; |
---|
| | cnt=1; |
---|
| | } |
---|
| | |
---|
| | public void addPositionLocal(float x , float y) { |
---|
| | // if(positionLocalx.size()==0) { |
---|
| | positionLocalx.add((double) x); |
---|
| | positionLocaly.add((double) y); |
---|
| | localstrokeNo.add(mStrokeNo.getValue()); |
---|
| | //}else{ |
---|
| | // positionLocalx2.add((double) x); |
---|
| | // positionLocaly2.add((double) y); |
---|
| | // localstrokeNo2.add(mStrokeNo.getValue()); |
---|
| | //} |
---|
| | public void addPositionRequest(float x, float y) { |
---|
| | paintModelContainer.getPaintConnectionModel().addPosition(cnt,x,y,mStrokeNo.getValue()); |
---|
| | cnt++; |
---|
| | } |
---|
| | public void addPositionRequest() { |
---|
| | // if(positionLocalx.size()!=0) { |
---|
| | for (int i = 0; i < positionLocalx.size(); i++) { |
---|
| | paintModelContainer.getPaintConnectionModel().addPosition(i, positionLocalx.get(i), positionLocaly.get(i),mStrokeNo.getValue()); |
---|
| | } |
---|
| | positionLocalx.clear(); |
---|
| | positionLocaly.clear(); |
---|
| | localstrokeNo.clear(); |
---|
| | // } |
---|
| | // if(positionLocalx2.size()!=0) { |
---|
| | // for (int i = 0; i < positionLocalx2.size(); i++) { |
---|
| | // paintModelContainer.getPaintConnectionModel().addPosition(i, positionLocalx2.get(i), positionLocaly2.get(i), localstrokeNo2.get(i)); |
---|
| | // } |
---|
| | // positionLocalx2.clear(); |
---|
| | // positionLocaly2.clear(); |
---|
| | // localstrokeNo2.clear(); |
---|
| | // } |
---|
| | public void addPositionRequestfirst() { |
---|
| | paintModelContainer.getPaintConnectionModel().addPosition(0,fsx,fsy,mStrokeNo.getValue()); |
---|
| | } |
---|
| | |
---|
| | //----------------------------------------------------------------- |
---|
| | // 招待APIの通信リクエスト |
---|
| |
---|
| | |