I want to write a text on the images which are taken from the gallery so plese help.

This is a discussion on I want to write a text on the images which are taken from the gallery so plese help. within the Android Forum forums, part of the Android Discussions category; i am giving my code bellow please help how write the text on the images which are taken from the sd card gallery and want ...

Results 1 to 2 of 2

Thread: I want to write a text on the images which are taken from the gallery so plese help.

  1. #1
    Android Lurker koteswar's Avatar
    Join Date
    Mar 2011
    Posts
    1

    I want to write a text on the images which are taken from the gallery so plese help.

    i am giving my code bellow please help how write the text on the images which are taken from the sd card gallery and want to store that image in the sdcard folder
    public class Firest extends Activity{
    /** Called when the activity is first created. */
    DemoView demoview;
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    demoview = new DemoView(this);
    setContentView(demoview);
    }

    private class DemoView extends View{
    public DemoView(Context context){
    super(context);
    }

    @Override protected void onDraw(Canvas canvas) {
    super.onDraw(canvas);

    // custom drawing code here
    // remember: y increases from top to bottom
    // x increases from left to right
    int x = 0;
    int y = 0;
    Paint paint = new Paint();
    paint.setStyle(Paint.Style.FILL);

    // make the entire canvas white
    paint.setColor(Color.WHITE);
    canvas.drawPaint(paint);
    // another way to do this is to use:
    // canvas.drawColor(Color.WHITE);

    // draw a solid blue circle
    paint.setColor(Color.BLUE);
    canvas.drawCircle(20, 20, 15, paint);

    // draw blue circle with antialiasing turned on
    paint.setAntiAlias(true);
    paint.setColor(Color.BLUE);
    canvas.drawCircle(60, 20, 15, paint);

    // compare the above circles once drawn
    // the fist circle has a jagged perimeter
    // the second circle has a smooth perimeter

    // draw a solid green rectangle
    paint.setAntiAlias(false);
    paint.setColor(Color.GREEN);
    canvas.drawRect(100, 5, 200, 30, paint);

    // create and draw triangles
    // use a Path object to store the 3 line segments
    // use .offset to draw in many locations
    // note: this triangle is not centered at 0,0
    paint.setStyle(Paint.Style.STROKE);
    paint.setStrokeWidth(2);
    paint.setColor(Color.RED);
    Path path = new Path();
    path.moveTo(0, -10);
    path.lineTo(5, 0);
    path.lineTo(-5, 0);
    path.close();
    path.offset(10, 40);
    canvas.drawPath(path, paint);
    path.offset(50, 100);
    canvas.drawPath(path, paint);
    // offset is cumlative
    // next draw displaces 50,100 from previous
    path.offset(50, 100);
    canvas.drawPath(path, paint);

    // draw some text using STROKE style
    paint.setStyle(Paint.Style.STROKE);
    paint.setStrokeWidth(1);
    paint.setColor(Color.MAGENTA);
    paint.setTextSize(30);
    canvas.drawText("Style.STROKE", 75, 75, paint);

    // draw some text using FILL style
    paint.setStyle(Paint.Style.FILL);
    //turn antialiasing on
    paint.setAntiAlias(true);
    paint.setTextSize(30);
    canvas.drawText("Style.FILL", 75, 110, paint);

    // draw some rotated text
    // get text width and height
    // set desired drawing location
    x = 75;
    y = 185;
    paint.setColor(Color.GRAY);
    paint.setTextSize(25);
    String str2rotate = "Rotated!";

    // draw bounding rect before rotating text
    Rect rect = new Rect();
    paint.getTextBounds(str2rotate, 0, str2rotate.length(), rect);
    canvas.translate(x, y);
    paint.setStyle(Paint.Style.FILL);
    // draw unrotated text
    canvas.drawText("!Rotated", 0, 0, paint);
    paint.setStyle(Paint.Style.STROKE);
    canvas.drawRect(rect, paint);
    // undo the translate
    canvas.translate(-x, -y);

    // rotate the canvas on center of the text to draw
    canvas.rotate(-45, x + rect.exactCenterX(),
    y + rect.exactCenterY());
    // draw the rotated text
    paint.setStyle(Paint.Style.FILL);
    canvas.drawText(str2rotate, x, y, paint);

    //undo the rotate
    canvas.restore();
    canvas.drawText("After canvas.restore()", 50, 250, paint);

    // draw a thick dashed line
    DashPathEffect dashPath =
    new DashPathEffect(new float[]{20,5}, 1);
    paint.setPathEffect(dashPath);
    paint.setStrokeWidth(8);
    canvas.drawLine(0, 300 , 320, 300, paint);

    }
    }


    }

  2. Android.net is the premier Android Forum. Registered users do not see these ads. .

  3. #2
    Super Moderator Droid-Xer's Avatar
    Join Date
    Jan 2011
    Location
    El Paso, TX
    Posts
    2,239
    Thanked
    59 times
    Twitter
    _B0BB0_
    I use pic say pro to write on gallery pictures

Remove Ads

http://www.scramblerducati.org/

Sponsored Links

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Similar Threads

  1. Replies: 0
    Last Post: 01-05-2011, 06:01 PM
  2. Gallery Issues
    By Epic Forums User in forum Samsung Epic 4G
    Replies: 0
    Last Post: 12-20-2010, 01:00 AM
  3. is there a predictive text and/or spell corrector for text programs?
    By Epic Forums User in forum Samsung Epic 4G
    Replies: 1
    Last Post: 09-17-2010, 02:16 PM

Search tags for this page

android app for writing on pictures
,

android app to write on photos

,

android app to write on pictures

,

android apps to write on pictures

,
android write text to camera photo
,
app to write on photos
,
app to write on pictures
,
apps to write on pictures
,
apps to write text on pictures
,
how to write on a picture android
,
how to write on photo with androidphone
,
ndroid app to write on pictures
,
write on pictures app
,
write text on your pictures app
,
writing text on image in android
Click on a term to search our sites for related topics.
Android Forum