use of org.signal.imageeditor.app.renderers.UrlRenderer in project Signal-Android by WhisperSystems.
the class MainActivity method initialModel.
private static EditorModel initialModel() {
EditorModel model = EditorModel.create();
EditorElement image = new EditorElement(new UrlRenderer("https://cdn.aarp.net/content/dam/aarp/home-and-family/your-home/2018/06/1140-house-inheriting.imgcache.rev68c065601779c5d76b913cf9ec3a977e.jpg"));
image.getFlags().setSelectable(false).persist();
model.addElement(image);
EditorElement elementC = new EditorElement(new UrlRenderer("https://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/SNice.svg/220px-SNice.svg.png"));
elementC.getLocalMatrix().postScale(0.2f, 0.2f);
// elementC.getLocalMatrix().postRotate(30);
model.addElement(elementC);
EditorElement elementE = new EditorElement(new UrlRenderer("https://www.vitalessentialsraw.com/assets/images/background-images/laying-grey-cat.png"));
elementE.getLocalMatrix().postScale(0.2f, 0.2f);
// elementE.getLocalMatrix().postRotate(60);
model.addElement(elementE);
EditorElement elementD = new EditorElement(new UrlRenderer("https://petspluslubbocktx.com/files/2016/11/DC-Cat-Weight-Management.png"));
elementD.getLocalMatrix().postScale(0.2f, 0.2f);
// elementD.getLocalMatrix().postRotate(60);
model.addElement(elementD);
EditorElement elementF = new EditorElement(new UrlRenderer("https://purepng.com/public/uploads/large/purepng.com-black-top-hathatsstandard-sizeblacktop-14215263591972x0zh.png"));
elementF.getLocalMatrix().postScale(0.2f, 0.2f);
// elementF.getLocalMatrix().postRotatF(60);
model.addElement(elementF);
EditorElement elementG = new EditorElement(new UriRenderer(Uri.parse("file:///android_asset/food/apple.png")));
elementG.getLocalMatrix().postScale(0.2f, 0.2f);
// elementG.getLocalMatrix().postRotatG(60);
model.addElement(elementG);
EditorElement elementH = new EditorElement(new MultiLineTextRenderer("Hello, World!", 0xff0000ff, MultiLineTextRenderer.Mode.REGULAR));
// elementH.getLocalMatrix().postScale(0.2f, 0.2f);
model.addElement(elementH);
EditorElement elementH2 = new EditorElement(new MultiLineTextRenderer("Hello, World 2!", 0xff0000ff, MultiLineTextRenderer.Mode.REGULAR));
// elementH.getLocalMatrix().postScale(0.2f, 0.2f);
model.addElement(elementH2);
return model;
}
use of org.signal.imageeditor.app.renderers.UrlRenderer in project Signal-Android by signalapp.
the class MainActivity method initialModel.
private static EditorModel initialModel() {
EditorModel model = EditorModel.create();
EditorElement image = new EditorElement(new UrlRenderer("https://cdn.aarp.net/content/dam/aarp/home-and-family/your-home/2018/06/1140-house-inheriting.imgcache.rev68c065601779c5d76b913cf9ec3a977e.jpg"));
image.getFlags().setSelectable(false).persist();
model.addElement(image);
EditorElement elementC = new EditorElement(new UrlRenderer("https://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/SNice.svg/220px-SNice.svg.png"));
elementC.getLocalMatrix().postScale(0.2f, 0.2f);
// elementC.getLocalMatrix().postRotate(30);
model.addElement(elementC);
EditorElement elementE = new EditorElement(new UrlRenderer("https://www.vitalessentialsraw.com/assets/images/background-images/laying-grey-cat.png"));
elementE.getLocalMatrix().postScale(0.2f, 0.2f);
// elementE.getLocalMatrix().postRotate(60);
model.addElement(elementE);
EditorElement elementD = new EditorElement(new UrlRenderer("https://petspluslubbocktx.com/files/2016/11/DC-Cat-Weight-Management.png"));
elementD.getLocalMatrix().postScale(0.2f, 0.2f);
// elementD.getLocalMatrix().postRotate(60);
model.addElement(elementD);
EditorElement elementF = new EditorElement(new UrlRenderer("https://purepng.com/public/uploads/large/purepng.com-black-top-hathatsstandard-sizeblacktop-14215263591972x0zh.png"));
elementF.getLocalMatrix().postScale(0.2f, 0.2f);
// elementF.getLocalMatrix().postRotatF(60);
model.addElement(elementF);
EditorElement elementG = new EditorElement(new UriRenderer(Uri.parse("file:///android_asset/food/apple.png")));
elementG.getLocalMatrix().postScale(0.2f, 0.2f);
// elementG.getLocalMatrix().postRotatG(60);
model.addElement(elementG);
EditorElement elementH = new EditorElement(new MultiLineTextRenderer("Hello, World!", 0xff0000ff, MultiLineTextRenderer.Mode.REGULAR));
// elementH.getLocalMatrix().postScale(0.2f, 0.2f);
model.addElement(elementH);
EditorElement elementH2 = new EditorElement(new MultiLineTextRenderer("Hello, World 2!", 0xff0000ff, MultiLineTextRenderer.Mode.REGULAR));
// elementH.getLocalMatrix().postScale(0.2f, 0.2f);
model.addElement(elementH2);
return model;
}
use of org.signal.imageeditor.app.renderers.UrlRenderer in project mollyim-android by mollyim.
the class MainActivity method initialModel.
private static EditorModel initialModel() {
EditorModel model = EditorModel.create();
EditorElement image = new EditorElement(new UrlRenderer("https://cdn.aarp.net/content/dam/aarp/home-and-family/your-home/2018/06/1140-house-inheriting.imgcache.rev68c065601779c5d76b913cf9ec3a977e.jpg"));
image.getFlags().setSelectable(false).persist();
model.addElement(image);
EditorElement elementC = new EditorElement(new UrlRenderer("https://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/SNice.svg/220px-SNice.svg.png"));
elementC.getLocalMatrix().postScale(0.2f, 0.2f);
// elementC.getLocalMatrix().postRotate(30);
model.addElement(elementC);
EditorElement elementE = new EditorElement(new UrlRenderer("https://www.vitalessentialsraw.com/assets/images/background-images/laying-grey-cat.png"));
elementE.getLocalMatrix().postScale(0.2f, 0.2f);
// elementE.getLocalMatrix().postRotate(60);
model.addElement(elementE);
EditorElement elementD = new EditorElement(new UrlRenderer("https://petspluslubbocktx.com/files/2016/11/DC-Cat-Weight-Management.png"));
elementD.getLocalMatrix().postScale(0.2f, 0.2f);
// elementD.getLocalMatrix().postRotate(60);
model.addElement(elementD);
EditorElement elementF = new EditorElement(new UrlRenderer("https://purepng.com/public/uploads/large/purepng.com-black-top-hathatsstandard-sizeblacktop-14215263591972x0zh.png"));
elementF.getLocalMatrix().postScale(0.2f, 0.2f);
// elementF.getLocalMatrix().postRotatF(60);
model.addElement(elementF);
EditorElement elementG = new EditorElement(new UriRenderer(Uri.parse("file:///android_asset/food/apple.png")));
elementG.getLocalMatrix().postScale(0.2f, 0.2f);
// elementG.getLocalMatrix().postRotatG(60);
model.addElement(elementG);
EditorElement elementH = new EditorElement(new MultiLineTextRenderer("Hello, World!", 0xff0000ff, MultiLineTextRenderer.Mode.REGULAR));
// elementH.getLocalMatrix().postScale(0.2f, 0.2f);
model.addElement(elementH);
EditorElement elementH2 = new EditorElement(new MultiLineTextRenderer("Hello, World 2!", 0xff0000ff, MultiLineTextRenderer.Mode.REGULAR));
// elementH.getLocalMatrix().postScale(0.2f, 0.2f);
model.addElement(elementH2);
return model;
}
Aggregations