×

Discussion Board

Results 1 to 10 of 10

Thread: Line width

  1. #1
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Line width

    It looks like j2me does not implement WIDTH parameter for drawing lines!
    Does it exist any workaround? Any additional library?!?
    My program draws a map, and line color is essential for the user: I can't just draw 1-pixel wide lines!

  2. #2
    Regular Contributor
    Join Date
    Jun 2008
    Location
    Singapore
    Posts
    167

    Re: Line width

    Hi,

    I dont know any additional lib if it is, but work around sure have..

    Just draw a rectangle, fill a color in, does it make a line bigger.......


    cheers
    ---Knowledge sharing is power---

    Hans

  3. #3
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Re: Line width

    Quote Originally Posted by tieutue View Post
    Hi,

    I dont know any additional lib if it is, but work around sure have..

    Just draw a rectangle, fill a color in, does it make a line bigger.......


    cheers
    yes... and what about an oblique line?

  4. #4
    Regular Contributor
    Join Date
    Jun 2008
    Location
    Singapore
    Posts
    167

    Re: Line width

    hi,

    if ur app heavily uses different type of line, i think u should develop ur own libs.

    I never try this in J2ME, but did it in very beging programming language (Pascal), a thicker line is in fact a set of thin line.
    a line is a set of point.
    To draw a oblique line, u have to know its Orbit, like a parabol y= x*x, a line y=ax+b...etc
    That's my idea. I really hope it can help u.

    Cheer
    ---Knowledge sharing is power---

    Hans

  5. #5
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Re: Line width

    Quote Originally Posted by tieutue View Post
    hi,

    if ur app heavily uses different type of line, i think u should develop ur own libs.

    I never try this in J2ME, but did it in very beging programming language (Pascal), a thicker line is in fact a set of thin line.
    a line is a set of point.
    To draw a oblique line, u have to know its Orbit, like a parabol y= x*x, a line y=ax+b...etc
    That's my idea. I really hope it can help u.

    Cheer
    Thanks, I already know a couple of algorithms to draw thick lines (trigonometry, Pitagora's theorem,...), but implementing them is boring, and maybe useless, if somebody already did it.

  6. #6
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Re: Line width

    Does anybody know if Nokia UI API can help on this topic?

    Or maybe there is a (free) j2me implementation of SVG images?

  7. #7
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,405

    Re: Line width

    Hi cassioli,

    if you want to use SVG in Java ME, you should take a look at JSR 226:

    http://www.forum.nokia.com/document/...w-summary.html

    Anyway, if it's only for line-drawing, you'll surely get better results (e.g.: performances) by implementing your own classes/methods that do this on standard Graphics objects.

    Pit

  8. #8
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Re: Line width

    Quote Originally Posted by jappit View Post
    Hi cassioli,

    if you want to use SVG in Java ME, you should take a look at JSR 226:
    I see, but I can't understand how to figure out if my device does support it.

  9. #9
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,405

    Re: Line width

    For Nokia phones, you can look at the detailed specs of each model here:

    http://www.forum.nokia.com/devices/matrix_all_1.html

    Also, you could try to take a look at the J2mePolish interactive database, filtering devices by JSR 226.

    Pit

  10. #10
    Super Contributor
    Join Date
    Mar 2003
    Posts
    580

    Re: Line width

    Quote Originally Posted by jappit View Post
    For Nokia phones, you can look at the detailed specs of each model here:

    http://www.forum.nokia.com/devices/matrix_all_1.html

    Also, you could try to take a look at the J2mePolish interactive database, filtering devices by JSR 226.

    Pit
    I see, but I can't understand how to figure out if my device does support it.
    fine, it does not. :-(

    Switching to backup solution.... (implementing by myself)

Similar Threads

  1. i cant build helloworld project
    By akhin in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2008-12-22, 12:38
  2. [moved] HELP! Phone Debug (GCCE)
    By joseph.m in forum Symbian C++
    Replies: 18
    Last Post: 2008-07-14, 10:42
  3. is it necessary to put rls_string? please help me
    By shankha in forum Symbian C++
    Replies: 8
    Last Post: 2007-10-16, 15:05
  4. carbidec++ helloworld project problem
    By akhin in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 0
    Last Post: 2007-03-11, 12:40
  5. carbide build problem help please
    By berkcekisbas in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2006-09-26, 19:41

Posting Permissions

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