use of su.levenetc.android.textsurface.Text in project TextSurface by elevenetc.
the class ColorSample method play.
public static void play(TextSurface textSurface) {
Text textA = TextBuilder.create("Now why you loer en kyk gelyk?").setPosition(Align.SURFACE_CENTER).setSize(100).setAlpha(0).build();
textSurface.play(TYPE.SEQUENTIAL, Alpha.show(textA, 1000), ChangeColor.to(textA, 1000, Color.RED), ChangeColor.fromTo(textA, 1000, Color.BLUE, Color.CYAN), Alpha.hide(textA, 1000));
}
use of su.levenetc.android.textsurface.Text in project TextSurface by elevenetc.
the class CookieThumperSample method play.
public static void play(TextSurface textSurface, AssetManager assetManager) {
final Typeface robotoBlack = Typeface.createFromAsset(assetManager, "fonts/Roboto-Black.ttf");
Paint paint = new Paint();
paint.setAntiAlias(true);
paint.setTypeface(robotoBlack);
Text textDaai = TextBuilder.create("Daai").setPaint(paint).setSize(64).setAlpha(0).setColor(Color.WHITE).setPosition(Align.SURFACE_CENTER).build();
Text textBraAnies = TextBuilder.create("bra Anies").setPaint(paint).setSize(44).setAlpha(0).setColor(Color.RED).setPosition(Align.BOTTOM_OF, textDaai).build();
Text textFokkenGamBra = TextBuilder.create(" hy's n fokken gam bra.").setPaint(paint).setSize(44).setAlpha(0).setColor(Color.RED).setPosition(Align.RIGHT_OF, textBraAnies).build();
Text textHaai = TextBuilder.create("Haai!!").setPaint(paint).setSize(74).setAlpha(0).setColor(Color.RED).setPosition(Align.BOTTOM_OF, textFokkenGamBra).build();
Text textDaaiAnies = TextBuilder.create("Daai Anies").setPaint(paint).setSize(44).setAlpha(0).setColor(Color.WHITE).setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textHaai).build();
Text texThyLamInnie = TextBuilder.create(" hy lam innie mang ja.").setPaint(paint).setSize(44).setAlpha(0).setColor(Color.WHITE).setPosition(Align.RIGHT_OF, textDaaiAnies).build();
Text textThrowDamn = TextBuilder.create("Throw damn").setPaint(paint).setSize(44).setAlpha(0).setColor(Color.RED).setPosition(Align.BOTTOM_OF | Align.CENTER_OF, texThyLamInnie).build();
Text textDevilishGang = TextBuilder.create("devilish gang").setPaint(paint).setSize(44).setAlpha(0).setColor(Color.RED).setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textThrowDamn).build();
Text textSignsInTheAir = TextBuilder.create("signs in the air.").setPaint(paint).setSize(44).setAlpha(0).setColor(Color.RED).setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textDevilishGang).build();
textSurface.play(new Sequential(ShapeReveal.create(textDaai, 750, SideCut.show(Side.LEFT), false), new Parallel(ShapeReveal.create(textDaai, 600, SideCut.hide(Side.LEFT), false), new Sequential(Delay.duration(300), ShapeReveal.create(textDaai, 600, SideCut.show(Side.LEFT), false))), new Parallel(new TransSurface(500, textBraAnies, Pivot.CENTER), ShapeReveal.create(textBraAnies, 1300, SideCut.show(Side.LEFT), false)), Delay.duration(500), new Parallel(new TransSurface(750, textFokkenGamBra, Pivot.CENTER), Slide.showFrom(Side.LEFT, textFokkenGamBra, 750), ChangeColor.to(textFokkenGamBra, 750, Color.WHITE)), Delay.duration(500), new Parallel(TransSurface.toCenter(textHaai, 500), Rotate3D.showFromSide(textHaai, 750, Pivot.TOP)), new Parallel(TransSurface.toCenter(textDaaiAnies, 500), Slide.showFrom(Side.TOP, textDaaiAnies, 500)), new Parallel(TransSurface.toCenter(texThyLamInnie, 750), Slide.showFrom(Side.LEFT, texThyLamInnie, 500)), Delay.duration(500), new Parallel(new TransSurface(1500, textSignsInTheAir, Pivot.CENTER), new Sequential(new Sequential(ShapeReveal.create(textThrowDamn, 500, Circle.show(Side.CENTER, Direction.OUT), false)), new Sequential(ShapeReveal.create(textDevilishGang, 500, Circle.show(Side.CENTER, Direction.OUT), false)), new Sequential(ShapeReveal.create(textSignsInTheAir, 500, Circle.show(Side.CENTER, Direction.OUT), false)))), Delay.duration(200), new Parallel(ShapeReveal.create(textThrowDamn, 1500, SideCut.hide(Side.LEFT), true), new Sequential(Delay.duration(250), ShapeReveal.create(textDevilishGang, 1500, SideCut.hide(Side.LEFT), true)), new Sequential(Delay.duration(500), ShapeReveal.create(textSignsInTheAir, 1500, SideCut.hide(Side.LEFT), true)), Alpha.hide(texThyLamInnie, 1500), Alpha.hide(textDaaiAnies, 1500))));
}
use of su.levenetc.android.textsurface.Text in project TextSurface by elevenetc.
the class Rotation3DSample method play.
public static void play(TextSurface textSurface) {
Text textA = TextBuilder.create("How are you?").setPosition(Align.SURFACE_CENTER).build();
Text textB = TextBuilder.create("I'm fine! And you?").setPosition(Align.SURFACE_CENTER, textA).build();
Text textC = TextBuilder.create("Haaay!").setPosition(Align.SURFACE_CENTER, textB).build();
int duration = 2750;
textSurface.play(TYPE.SEQUENTIAL, new AnimationsSet(TYPE.SEQUENTIAL, Rotate3D.showFromCenter(textA, duration, Direction.CLOCK, Axis.X), Rotate3D.hideFromCenter(textA, duration, Direction.CLOCK, Axis.Y)), new AnimationsSet(TYPE.SEQUENTIAL, Rotate3D.showFromSide(textB, duration, Pivot.LEFT), Rotate3D.hideFromSide(textB, duration, Pivot.RIGHT)), new AnimationsSet(TYPE.SEQUENTIAL, Rotate3D.showFromSide(textC, duration, Pivot.TOP), Rotate3D.hideFromSide(textC, duration, Pivot.BOTTOM)));
}
use of su.levenetc.android.textsurface.Text in project TextSurface by elevenetc.
the class ShapeRevealLoopSample method play.
public static void play(TextSurface textSurface) {
Text textA = TextBuilder.create("Now why you loer en kyk gelyk?").setPosition(Align.SURFACE_CENTER).build();
Text textB = TextBuilder.create("Is ek miskien van goud gemake?").setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textA).build();
Text textC = TextBuilder.create("You want to fight, you come tonight.").setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textB).build();
Text textD = TextBuilder.create("Ek moer jou sleg! So jy hardloop weg.").setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textC).build();
final int flash = 1500;
textSurface.play(new Loop(Rotate3D.showFromCenter(textA, 500, Direction.CLOCK, Axis.X), new AnimationsSet(TYPE.PARALLEL, ShapeReveal.create(textA, flash, SideCut.hide(Side.LEFT), false), new AnimationsSet(TYPE.SEQUENTIAL, Delay.duration(flash / 4), ShapeReveal.create(textA, flash, SideCut.show(Side.LEFT), false))), new AnimationsSet(TYPE.PARALLEL, Rotate3D.showFromSide(textB, 500, Pivot.TOP), new TransSurface(500, textB, Pivot.CENTER)), Delay.duration(500), new AnimationsSet(TYPE.PARALLEL, Slide.showFrom(Side.TOP, textC, 500), new TransSurface(1000, textC, Pivot.CENTER)), Delay.duration(500), new AnimationsSet(TYPE.PARALLEL, ShapeReveal.create(textD, 500, Circle.show(Side.CENTER, Direction.OUT), false), new TransSurface(1500, textD, Pivot.CENTER)), Delay.duration(500), new AnimationsSet(TYPE.PARALLEL, new AnimationsSet(TYPE.PARALLEL, Alpha.hide(textD, 700), ShapeReveal.create(textD, 1000, SideCut.hide(Side.LEFT), true)), new AnimationsSet(TYPE.SEQUENTIAL, Delay.duration(500), new AnimationsSet(TYPE.PARALLEL, Alpha.hide(textC, 700), ShapeReveal.create(textC, 1000, SideCut.hide(Side.LEFT), true))), new AnimationsSet(TYPE.SEQUENTIAL, Delay.duration(1000), new AnimationsSet(TYPE.PARALLEL, Alpha.hide(textB, 700), ShapeReveal.create(textB, 1000, SideCut.hide(Side.LEFT), true))), new AnimationsSet(TYPE.SEQUENTIAL, Delay.duration(1500), new AnimationsSet(TYPE.PARALLEL, Alpha.hide(textA, 700), ShapeReveal.create(textA, 1000, SideCut.hide(Side.LEFT), true))), new TransSurface(4000, textA, Pivot.CENTER))));
}
use of su.levenetc.android.textsurface.Text in project TextSurface by elevenetc.
the class SlideSample method play.
public static void play(TextSurface textSurface) {
Text textA = TextBuilder.create(" How are you?").build();
Text textB = TextBuilder.create("I'm fine! ").setPosition(Align.LEFT_OF, textA).build();
Text textC = TextBuilder.create("Are you sure?").setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textB).build();
Text textD = TextBuilder.create("Totally!").setPadding(10, 10, 10, 10).setPosition(Align.BOTTOM_OF | Align.CENTER_OF, textC).build();
int duration = 1250;
textSurface.play(TYPE.SEQUENTIAL, new AnimationsSet(TYPE.PARALLEL, new AnimationsSet(TYPE.SEQUENTIAL, new AnimationsSet(TYPE.PARALLEL, Slide.showFrom(Side.LEFT, textA, duration), Slide.showFrom(Side.RIGHT, textB, duration)), Slide.showFrom(Side.TOP, textC, duration), Slide.showFrom(Side.BOTTOM, textD, duration)), new TransSurface(duration * 3, textD, Pivot.CENTER)), new AnimationsSet(TYPE.PARALLEL, new AnimationsSet(TYPE.SEQUENTIAL, new AnimationsSet(TYPE.PARALLEL, Slide.hideFrom(Side.LEFT, textD, duration), Slide.hideFrom(Side.RIGHT, textC, duration)), Slide.hideFrom(Side.TOP, textB, duration), Slide.hideFrom(Side.BOTTOM, textA, duration)), new TransSurface(duration * 3, textA, Pivot.CENTER)));
}
Aggregations