×

Discussion Board

Results 1 to 4 of 4

Thread: line width ???

  1. #1
    Regular Contributor
    Join Date
    Aug 2009
    Location
    Iran - Tabriz
    Posts
    111

    line width ???

    Hi
    how can i set line width ??? (in DrawLine method) is it possible ???

  2. #2
    Registered User
    Join Date
    Oct 2009
    Location
    Noida
    Posts
    941

    Re: line width ???

    how can i set line width ??? (in DrawLine method) is it possible ???
    No direct solution for this, You need to put in your logic for the same and draw mutiple line closely bu just changing the x,y x1,y1
    Thanks,
    Ekta

  3. #3
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: line width ???

    Quote Originally Posted by mahdi68 View Post
    Hi
    how can i set line width ??? (in DrawLine method) is it possible ???
    I guess you wan to draw the line on the canvas and as soon as the line reaches at the corner of the screen you wanna break the line and start the drawing from the next line..?
    You have to customize the drawLine() method.What you can is do that just calculate the total width of the line and if this is greater than the screen width then you can break the line and can start drawing from the next line...and so on forth.

    You can find various demos for this on the web, just search...
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  4. #4
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: line width ???

    Quote Originally Posted by mahdi68 View Post
    Hi
    how can i set line width ??? (in DrawLine method) is it possible ???
    By default Graphics.drawLine(startx,starty,endx,endy) in J2me draws a single pixel width line only between two points. You can draw multiple lines just 1 pixel above and 1 pixel lower to this line to get a broader say 2 or 3 pixel line for e.g: assuming these are horizontal lines you can do something like this:

    PHP Code:
     g.draw(10,10,200,10); // single pixel line
     
    g.draw(10,11,200,11);  // double pixel line now..
     
    g.draw(10,12,200,12);  // 3 pixel width line now.. and so on. 
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

Similar Threads

  1. GoogleIt
    By deepika.mangla in forum Symbian
    Replies: 5
    Last Post: 2011-05-28, 11:04
  2. problemas con pjsip y vas
    By joselowolf in forum VoIP
    Replies: 2
    Last Post: 2010-12-14, 13:29
  3. compilation error: identifier redeclared
    By netra in forum Symbian
    Replies: 2
    Last Post: 2007-06-22, 10:42

Posting Permissions

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