Coloring between the lines

hello,
i am having a problem figuring out something out in java. i have to write an app that has the outline of a human body that nurses will "color" certain areas. then i need to calculate what percent of what area was colored( left arm, right arm, etc).
i have the body outline in the form of an .png. i can load the image, copy it to a BufferedImage, render it and draw it back to the screen. the image consists of an all white body with a black outline, on a tan background,
problem #1) i can't seem to find a way to keep the the painting inside the black outline of the body. any suggestions on how to approach this?
problem #2) any advice on calculating the percentage of each area colored would be appreciated.
thanks.

When you're drawing, it should be easy enough to check the pixels you're drawing on, and if they're not white, don't draw. I don't have the API in front of me so I can't tell you how to do that..
I'm not sure how big your image is, but if it isn't huge, it would probably be fast enough to loop through each pixel, check the color and calculate a percentage that way.

Similar Messages

  • How to remove space between the lines

    Hi,
    In my repoprt output I am getting space between the lines. I have changed
    the repeating frame and field -> vertical elasticity and horizontal elasticity to fallowing combinations.
    fixed, fixed.
    variable, fixed,
    expand, variable,
    variable, expand
    Then also I am getting space between the lines of my output.
    Could you help me in this?
    Thanks

    Change the Vertical Elasticity of fields and frames to Variable. If for some fields or frames you don't want to change the vertical elasticity, then remove extra space by adjusting the height of fields/frames.
    Also check repeating frames property 'Vert. Space Between Frames'. Default is 0.
    Hope this helps.

  • Applying color to the line in a linechart  while using a JFreeChart

    hi
    I had created a line chart using a JFreeChart.It had given its default color to the line,I want to modify the color of the line.How should i do it?

    import java.awt.*;
    import org.jfree.chart.*;
    import org.jfree.chart.plot.*;
            //to modify the color of the lines :
            Plot plot = jfreechart.getPlot();
            plot.setDrawingSupplier(getSupplier());
        private static Color myBlue=new Color(0,128,255);
        public static DefaultDrawingSupplier getSupplier(){
            return new DefaultDrawingSupplier(
                    new Paint[] {
                myBlue,
                        Color.green,
                        Color.red,
                        Color.orange,
                        Color.magenta,
                        Color.cyan,
                        Color.pink,
                        Color.gray,
                        Color.yellow,
                        ChartColor.DARK_RED,
                        ChartColor.DARK_GREEN,
                        ChartColor.LIGHT_RED,
                        ChartColor.DARK_YELLOW,
                        ChartColor.DARK_MAGENTA,
                        ChartColor.DARK_CYAN,
                        Color.lightGray,
                        ChartColor.LIGHT_RED,
                        ChartColor.LIGHT_BLUE,
                        ChartColor.LIGHT_GREEN,
                        ChartColor.LIGHT_YELLOW,
                        ChartColor.LIGHT_MAGENTA,
                        ChartColor.LIGHT_CYAN},
                    DefaultDrawingSupplier.DEFAULT_OUTLINE_PAINT_SEQUENCE,
                                DefaultDrawingSupplier.DEFAULT_STROKE_SEQUENCE,
                                DefaultDrawingSupplier.DEFAULT_OUTLINE_STROKE_SEQUENCE,
                                DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE
        }  

  • Line spacing is wrong. Space between the lines.

    Packed 17/04/11 Posted 18/04/11
    Sent posted email 17/04/11
    In firefox 4 in my Ebay when I add notes I get a space between the lines. Above is how it is now. Below is how it should be
    Packed 17/04/11 Posted 18/04/11
    Sent posted email 17/04/11
    I have looked in tools and options but cannot find a way to change this. It was fine in firefox 3.5. Only had this since dowenloading firefox 4. I am running XP

    Clear the cache and the cookies from sites that cause problems.
    * "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites causing problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    Reset the page zoom on pages that cause problems: <b>View > Zoom > Reset</b> (Ctrl+0 (zero); Cmd+0 on Mac)
    * http://kb.mozillazine.org/Zoom_text_of_web_pages

  • Is there a way to reduce the size between the lines in when creating a form in FormsCentral so that you can fit more lines on a page?

    Is there a way to reduce the size between the lines in when creating a form in FormsCentral so that you can fit more lines on a page?

    In the Folders Tab, right click on  folder  then click Reveal in Explorer. This will open an Explorer window with the folder selected.  In Explorer you can right click > Properties or navigate to whatever you want to measure.

  • Reading between the lines

    "Verizon stinks! I hve a $30 plan and they charge me 3 times what theyre supposed to charge for my plan"
    (translation: "I went over my minutes. 4 months in a row")
    "Dont' trust Verizon! they made changes to my plan without asking first"
    (translation: "I made the changes but didnt understand what i was doing.I saw on the web site that I could block a number from calling for free so I did it then got a letter telling me that a change was made.")
    "Their customer service sucks! They refuse to work with me"
    (translation: "I want a credit and they won't give it to me")
    "I wanted to talk to a manager and they would not let me"
    (translation: "I wanted to talk to a manager RIGHT NOW but one wasnt available RIGHT NOW")
    "Verizon is the worst becasue they wont let me have another phone!!"
    (Translation: "They won't let me have a phone at the price I want everytime I want a new phone")
    "Why cant Verizon be like the other guys? I want rollover minutes! I want unlimited data! I want free incoming calls! I want to get a phone cheap without a contract!"
    (translation:"I want every thing under the sun and still have the best network and service!"
    "It's fraud to say that my 9 year old son agreeed to get those texts for $10 a month! How can a kid agree to that??"
    (Translation: "I keep forgetting that when I signed the contract I agreed that no matter who had the phone I was responsible for what was done with it")
    "I specificly told Verizon to block all the internet on my sisters phone but they didnt and now I got a big bill!!"
    (translation: "My sister new good and well she wasnt supposed to be using the internet and used it anyway and now I cant get her to pay her share so I want Verizon to credit me"
    "I didn't know I couldnt use my phone in Jamaica without getting extra charges!"
    (translation: "Yes, I did. I got text message sand ignored them")
    "But nobody TOLD me that!"
    (translation: "I don't like to read. it makes my brain itch. I don't want to ask before I do it because I dont want the answer to ruin what I'm about to do.")

    My personal favorite in reading between the lines is with the CLN program
    we have a 110 point inspection
    (translation: "we don't actually look which is why you have had Droid X's show up with non-responsive touchscreens")
    or
    we are the Android carrier
    (translation: "we don't have the signature Android phone, nor are we picking up the leading phones from that manufacturer....we would rather let our customers beta test Motorola's phones"
    Before someone jumps up to defend Moto....let's take a look at this. What do you call something that is released with already planned updates to resolve bugs? Easy.....BETA.....what do you call the X2 and the D3 being released with already planned updates? BETA

  • How to automatically build a table with 2 alternated font colors for the lines ?

    Hi,
    I'm looking for a way to automatically build a table with alternate background color and alternate font color for the lines.
    I have this particular project (a list of companies of an industrial area) and it is updated twice a year :
    I managed to set an automated alternate background color of the lines so this works well (white/blue/white/blue...)
    But the font color does not automatically alternates... and I do not know how to set this up...
    All the companies are ordered alphabetically so when I have to insert or delete one, the whole text of the table under the modified line is messed up. Then I have unreadable white text on white background and blue text on blue background...
    Does anyone have an idea on how to automatically alternate the font color ?
    Thank you.
    Best regards,
    G.

    Hi,
    I know this [JS] code is awful but it works. If  someone wants to correct it …! 
    At the beginning, you have an Excel file. You play a little with it [doing concatenations] to get, after importing it in ID:
    Then, just run the .jsx:
    Done! 

  • How do you remove the space between the lines in your email signature?

    I have a problem with my signature in business catalyst mail.
    I have added a logo and my signature and when I send the email it looks good.
    There is the space between the lines that I want.
    But when the mail is received it looks like this:
    with too much space between each line. How do I fix this?
    Thank you in advance for you help and your time.
    Regards Winnie

    Hello,
    Well the good news is it looks like it's going to be some css and html issues the bad news (for most people) is it looks like it's going to be some css and html issues.
    Couple things.
    Are you looking at vertical or horizontal spacing?
    Region 1 in the shipped themes are used for breadcrumbs and usually have set vertical spacing and margins.
    Have you looked at the other layout examples in that application, there's 2 that show different ways of getting exact layout.
    Look at your page template there is an attribute called
    Region Table attributes
    if it looks like
    summary="" cellpadding="0" border="0" cellspacing="0" width="100%"
    change it to
    summary="" cellpadding="0" border="0" cellspacing="0"
    and see if that helps?
    If you can put an example on htmldb.oracle.com thats the easiest way to help you out, as a rule it's very hard to debug UI issues without seeing them.
    Carl

  • Getting a extra space between the line in the PDF output

    I an having the rtf templete contains a table . That table contains 3 row and for the second row i have a for loop start at 1st column and end's at last column . first and 3rd row are the simple data donot have any for loop .
    So in the PDF out put of the templete gives me extra blank line between the data for the 2nd row.
    Example
    1st row ------ Contains data field
    2nd row For Each grouph data fields End for
    3rd row --------- Contains data field
    On the PDF output the data which is in the for loop ( 2nd row ) takes one more extra line ( space ) between the record .

    I an having the rtf templete contains a table . That table contains 3 row and for the second row i have a for loop start at 1st column and end's at last column . first and 3rd row are the simple data donot have any for loop .
    So in the PDF out put of the templete gives me extra blank line between the data for the 2nd row.
    Example
    1st row ------ Contains data field
    2nd row For Each grouph data fields End for
    3rd row --------- Contains data field
    On the PDF output the data which is in the for loop ( 2nd row ) takes one more extra line ( space ) between the record .

  • Is it possible to change  color on the line strip/code view in CS6?

    Hello -
    I did some research on this and cant seem to see if this can be done - I was hoping to change the color of the blue line menu on the code view screen.
    Eric

    I take it you're referring to that vertical line in the left hand side of Code View? I don't think it's possible to change the color.  If you disable line numbers (#), it's a bit less noticeable.
    Nancy O.

  • Coloring inside the lines

    What is the best way to use Adobe Ink to have color stay inside the lines?
    thanks
    joe

    As no one at Adobe can seem to answer questions these days I will offer the only solution I have found. There doesn't seem to be a way to this but I go in afterwards and clean up lines using slide and the eraser which allows you to erase in a straight edge.
    Tracey

  • Regarding the color of the line of the footnote

    Hi I'm using pages 09, - love it!
    I'm currently doing a major repport, in where I need to have a specific coloscheme. It works quite well in all aspects, except regaring the black line that occurs when I put in a foot note. So my problem is, how can I change the color of the standardized black line?
    Just to sum i up, I have no problem whatsoever of drawing a line in my colorscheme it's only regarding the black line which seperates your acctual text from your foot notes.
    Looking forward to hear from you all,
    regards
    DenmarkC

    There isn't any setting regarding the footnote line. What you can do is use a line shape and position it above the footnote line. Copy it and past it on the next page with a footnote and so forth.

  • Problem in changing the space between the lines in sap script

    Hi,
    I am working on a sapscript in which i have to decrease the widht of 2 columns but i am not able to understand how to do it. i go to the info part of script saw d coding like his:-
    /E           FINAL
    C1           &i_final-count_c(3Z)& &i_final-text_c(24)& &i_final-result_c(8)&
               &i_final-count_m(3)& &i_final-text_m(22)& &i_final-result_m(8)&
               &i_final-nonconfirm_m(10)&  &i_final-count_mi(3)& &i_final-text_mi(25)&
    =            &i_final-result_mi(8)& &i_final-nonconfirm_mi&
    /*           **** CHANGE THE NAME OF VARIABLE C, M AND MI RESPECTIVELY
    /*           FOR CRITICAL PROPERTIES
    /:           IF &I_FINAL-TEXT_C+24(16)& NE '                '
    C1               &i_final-text_c+24(16)&,,,,&i_final-result_c+8(8)&,,
                  &i_final-text_m+22(18)&,,   &i_final-result_m+8(8)&,,,,,,,,
               &i_final-text_mi+25(15)&,,,, &i_final-result_mi+8(8)&
    /:           ELSEIF &I_FINAL-RESULT_C+8(8)& NE '        '.
               &temp(40)&   &i_final-result_c+8(8)&,,  &i_final-text_m+22(18)&
    =           ,,  &i_final-result_m+8(8)&,,,,,,,, &i_final-text_mi+25(15)&,,
    =           &i_final-result_mi+8(8)&
    /*           FOR MAJOR
    /:           ELSEIF &I_FINAL-TEXT_M+22(18)& NE '                  '
    C1               &i_final-text_c+24(16)&,,,,&i_final-result_c+8(8)&,,
                  &i_final-text_m+22(18)&,,  &i_final-result_m+8(8)&,,,,,,,,
               &i_final-text_mi+25(15)&,,,,  &i_final-result_mi+8(8)&
    /:           ELSEIF &I_FINAL-RESULT_M+8(8)& NE '        '
    C1               &i_final-text_c+24(16)&,,,,&i_final-result_c+8(8)&,,
                  &i_final-text_m+22(18)&,,  &i_final-result_m+8(8)&,,,,,,,,
               &i_final-text_mi+25(15)&,,,,  &i_final-result_mi+8(8)&
    /:           ELSEIF &I_FINAL-TEXT_MI+25(15)& NE '               '
    C1               &i_final-text_c+24(16)&,,,,&i_final-result_c+8(8)&,,
                  &i_final-text_m+22(18)&,,  &i_final-result_m+8(8)&,,,,,,,,
               &i_final-text_mi+25(15)&,,,,  &i_final-result_mi+8(8)&
    /:           ELSEIF &I_FINAL-RESULT_MI+8(8)& NE '        '
    C1               &i_final-text_c+24(16)&,,,,&i_final-result_c+8(8)&,,
                  &i_final-text_m+22(18)&,,  &i_final-result_m+8(8)&,,,,,,,,
               &i_final-text_mi+25(15)&,,,,  &i_final-result_mi+8(8)&
    /:           ENDIF.
    /E           BREAK
    /:           NEW-PAGE
    Please provide me guidlines where i can make the changes to decrease the width of the lines.
    Edited by: ricx .s on Apr 30, 2009 11:29 AM

    Hi,
    You can make changes in the offsets if it is not harming the display of the data...
    for example
    &i_final-text_c+24(16)&,,,,&i_final-result_c+8(8)&,,        " in this line you can reduce +24(16) to +24(10)
    " or to something else where the display of data is not harmed
    &i_final-text_m+22(18)&,,  &i_final-result_m+8(8)&,,,,,,,,    " and also in this line +22(18) to +22(10 or 12) or
    " something
    &i_final-text_mi+25(15)&,,,,  &i_final-result_mi+8(8)&   " in this line  + 25(15) to   +25(10 or 12)
    " or something
    and also in the line just after the final text element
    &i_final-count_c(3Z)& &i_final-text_c(24)& &i_final-result_c(8)&        " you can change the offsets
    " which are there in the brackets where the display of the data is not harmed
    &i_final-count_m(3)& &i_final-text_m(22)& &i_final-result_m(8)&
    &i_final-nonconfirm_m(10)&  &i_final-count_mi(3)& &i_final-text_mi(25)&
    &i_final-result_mi(8)& &i_final-nonconfirm_mi&
    Regards,
    Siddarth

  • Adding markers and color between the markers to a knob

    Fairly new Labview user.  I'm having trouble figuring out how to control via program the markers and colors on a knob.  Basically, I need a zero marker, and green between two markers where range of motion is permitted and red outside these markers where range is not permitted.  (This program is for a machine that measures a patient's wrist flextion). The positions of all markers (except the zero) needs to be programatically changeable for different patients, so I need to do it via property nodes.  The Labview help and menu system isn't helping me much.  Maybe you can.  Thanks.
    -joel

    Take a look at this thread for other ideas
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Is SDO_DISTANCE bug between the line and multipoints?

    SDO_GEOM.SDO_DISTANCE(MDSYS.SDO_GEOMETRY(2002,8307,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),MDSYS.SDO_ORDINATE_ARRAY(113.363258142822,23.133208779985,113.3633,23.13331)),
    MDSYS.SDO_GEOMETRY(2005,8307,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,1,2),MDSYS.SDO_ORDINATE_ARRAY(
    113.363258142822,23.1868700130491,113.365811605804,23.1322024265981))
    ,0.000005)
    the result is 5955.609972214.
    SDO_GEOM.SDO_DISTANCE(MDSYS.SDO_GEOMETRY(2002,8307,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),MDSYS.SDO_ORDINATE_ARRAY(113.363258142822,23.133208779985,113.3633,23.13331)),
    MDSYS.SDO_GEOMETRY(2005,8307,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,1,2),MDSYS.SDO_ORDINATE_ARRAY(
    113.365811605804,23.1322024265981,113.363258142822,23.1868700130491
    ,0.005)
    the result is 284.072193675135.
    In my points the results should be the same. Why are they different?
    If change the Element_Info
    SDO_GEOM.SDO_DISTANCE(MDSYS.SDO_GEOMETRY(2002,8307,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),MDSYS.SDO_ORDINATE_ARRAY(113.363258142822,23.133208779985,113.3633,23.13331)),
    MDSYS.SDO_GEOMETRY(2005,8307,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,1,1,3,1,1),MDSYS.SDO_ORDINATE_ARRAY(
    113.363258142822,23.1868700130491,113.365811605804,23.1322024265981))
    ,0.000005)
    the result will be 284.072193675135.
    Why?Is it a bug of SDO_DISTANCE?

    Have a look here:
    Re: How to use java to store Multipolygon
    this is the javadoc:
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14373/oracle/spatial/geometry/JGeometry.html#JGeometry_int__int__int____double___
    public JGeometry(int gtype,
    int srid,
    int[] elemInfo,
    double[] ordinates)
    Constructs a JGeometry instance with given information
    Parameters:
    gtype - the geometry type
    srid - the SRS id; if 0 is used then the MDSYS.SDO_GEOMETRY.SDO_SRID will be set to null when converted into DB format.
    elemInfo - geometry element info array
    ordinates - geometry ordinates array
    Maybe something like:
    JGeometry ps = New JGeometry (2005, 8307, new int[]{1,1, YOUR NUMBER OF POINTS IN YOUR CLUSTER}, new double[]{YOUR ORDINATES})
    Luc

Maybe you are looking for

  • Getting some strange results

    I usually use iMovie 4, which is easy to use and effective for my application. While using iMovie 6 for a project that has clips that are too long for iMovie 4, I experienced the following problems: 1. When a fade out is inserted, short snips of audi

  • Searching for the right product.

    Greetings - Please excuse me if this is the wrong forum to post this question to. I am trying to find out which Adobe product is best suited for creating high definition (1080p) slideshows. My requirements are: The ability to import JPEG and/or TIFF

  • External display as main display possible?

    im trying to figure this out.. driving me nuts.. how can i make my external display my main display?? is this possible?? im connecting via VGA thanks..

  • Connection to the database and session

    Friends I am developing a JSP based application ,and I am storing Connection (to the database) info in a session variable in my main menu , and then I retrieve the connection session in all the pages that I navigate to. But a friend of mine told me i

  • How to solve this exception

    Exception in thread "main" javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial that is in the SUN APPLICATION