Fuzzy lines with java2d?

I want to draw a line whose edges are blurred and whose corners/ends are round using java2d. The rounded corners I found in BasicStroke, but I can't find anyway to have blurry edges on the line. I've looked in BasicStroke's source to figure out how to do my own stroke and run into undocumented packages. Is there a way to do what I want? Am I looking in the wrong place? thx

=| guess I can't edit. Anyways I guess I figured it out, but if anyone can help me create a Stroke implementaion that does the same thing, that's be great. The code frag is,
Graphics2D g2 = (Graphics2D) g;
g2.setPaint(new Color(0.0f, 0.0f, 1.0f, 0.25f));
g2.setStroke(new BasicStroke(20.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
g2.draw(new Line2D.Double(x, y, x + cx, y + cy));
g2.setStroke(new BasicStroke(15.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
g2.draw(new Line2D.Double(x, y, x + cx, y + cy));
g2.setStroke(new BasicStroke(10.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
g2.draw(new Line2D.Double(x, y, x + cx, y + cy));
g2.setStroke(new BasicStroke(5.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
g2.draw(new Line2D.Double(x, y, x + cx, y + cy));

Similar Messages

  • My mac screen comes out with white fuzzy lines going across the screen, it used to just go back to normal and out of no where it freezes and the white fuzzy lines go across the screen. Now it is frozen at the opening screen. what do i do?

    My mac screen is frozen with white fuzzy lines going across the screen. I shut it off and turn it back on but it still remains white fish lines on the start up screen. I've tried revolting it, it works sometimes but now its stuck at the starting screen. I have been at this for 2 hours to try and fix it but nothing has changed about the screen. What do I do, if I break this computer I'm screwed.

    I would post a picture of the screen but I do not know how to do that

  • Fuzzy line on the middle of display.

    Recently i have found a fuzzy line in the middle of my retina macbook pro screen (15"). I have always treated it very well, it never falled down.
    The line appear only with a strong light from sun, especially with dark backgounds on the screen.
    The line seams like dust, it's not like a crack. It has a lenght of 9cm long and an height of 1mm.
    I understand that the problem is probably related to how i used the mac, but i don't undertand the cause. The only thing have done is replacing the Spek cover, but two or three weeks before now. What do you think? Have I to replace the screen? How much does it cost?
    Hope you can help me.
    Olivum
    Sorry for my bad english

    Warranty is worldwide. He can take it to a Dutch Apple Store without worrying
    Best of luck.

  • W520 extended out to LCD got fuzzy lines?

    have been using these 2 machines for years already, i linked them up with a Display Port -> DVI cable, somehow now the Philips LCD got fuzzy line like this :
    https://www.dropbox.com/s/yqa2lyt9llf1yj6/20150128​_101415.mp4?dl=0
    Tried with a VGA cable and used Nvidia software to extend screens, but problem still exists. 
    My machines:
    W520 + Philips 240PW.

    Does the Philips LCD work using another display source?
    W520: i7-2720QM, Q2000M at 1080/688/1376, 21GB RAM, 500GB + 750GB HDD, FHD screen
    X61T: L7500, 3GB RAM, 500GB HDD, XGA screen, Ultrabase
    Y3P: 5Y70, 8GB RAM, 256GB SSD, QHD+ screen

  • JavaFX Canvas : "fuzzy" lines compared to Swing

    Hi,
    I would very much like to port my Swing application (that draws on a JComponent) to JavaFX. But to my dismay the JavaFX Canvas does not draw as sharp and thin lines as Swing does.
    Lines drawn with the same thickness is noticeably thicker (and "fuzzier") on the JavaFX Canvas than the equivalent Swing lines. I have tested both on Windows (7) and Linux, both 64-bit.
    In my JavaFX app, I proceed like this: gc.beginPath() --> gc.moveTo(..) --> gc.lineTo() --> gc.stroke().
    Is there a setting or something I am missing?

    You need to take into account the coordinate system.
    For further explanation of why this works see the answer to the question below and Node's javadoc:
    http://stackoverflow.com/questions/11881834/what-are-a-lines-exact-dimensions-in-javafx-2
    http://docs.oracle.com/javafx/2/api/javafx/scene/Node.html
    At the device pixel level, integer coordinates map onto the corners and cracks between the pixels and the centers of the pixels appear at the midpoints between integer pixel locations. Because all coordinate values are specified with floating point numbers, coordinates can precisely point to these corners (when the floating point values have exact integer values) or to any location on the pixel. For example, a coordinate of (0.5, 0.5) would point to the center of the upper left pixel on the Stage. Similarly, a rectangle at (0, 0) with dimensions of 10 by 10 would span from the upper left corner of the upper left pixel on the Stage to the lower right corner of the 10th pixel on the 10th scanline. The pixel center of the last pixel inside that rectangle would be at the coordinates (9.5, 9.5).
    import javafx.application.Application;
    import javafx.scene.*;
    import javafx.scene.canvas.*;
    import javafx.stage.Stage;
    /** JavaFX Canvas : "fuzzy" lines compared to Swing JavaFX Canvas : "fuzzy" lines compared to Swing */
    public class FuzzyCanvas extends Application {
      public static void main(String[] args) { launch(args); }
      @Override public void start(Stage stage) {
        Canvas canvas = new Canvas(50, 50);
        GraphicsContext gc = canvas.getGraphicsContext2D();
        gc.beginPath();    // fuzzy line.
        gc.moveTo(10, 30);
        gc.lineTo(20, 30);
        gc.stroke();
        gc.beginPath();    // clean line.
        gc.moveTo(10.5, 39.5);
        gc.lineTo(19.5, 39.5);
        gc.stroke();
        stage.setScene(new Scene(new Group(canvas)));
        stage.show();
    }

  • Freezing, fuzzy lines

    Whilst using my ibook g4 today I clicked on explorer and all of a sudden a load of little lines started to flick on the screen and the screen froze. I have re started my computer a number of times since and heres what happens
    1.The grey screen comes up with apple logo and spinny thing then freezes
    2.Goes through to a blue screen and freezes
    3.Gets to the desktop display and then freezes with fuzzy lines
    I have tried the fsck -y(think thats the right thing), and it says everything is fine. I have inserted my osx restore disk only to have that freeze aswell with the fuzzy lines.
    I have managed to firewire all the documents onto my G5 so i dont mind wiping anything.
    Any suggestions would be much appreciated
    Trev

    Hello Trev
    Given that your machine works in target mode (I assume this is how you got your data off) you may be able to run disk utility from your G5 and see if that shows up anything amiss.
    If not then it is either get hold of a copy of diskwarrior which can help or go for a clean install. Make sure you go for a secure disk formatting option (Zero all data) as this will map out any bad sectors on your drive.
    You havn't by any chance got Norton on there have you? Had a couple of freinds who's machines have gone west with similar symptoms as a result.
    S.

  • Fuzzy lines in youtube from compressing it on Imovie 09

    I have tried to get those fuzzy lines out of youtube, when I do the compression for sharing in high quality, how can I get rid of it.
    http://www.youtube.com/watch?v=NBSlL-RF7ao

    Hi,
    Try exporting your HD footage using one of the exports I've marked in green, I believe there is a bug when exporting HD interlaced footage using the exports I've marked in red that will result in the type of problem you are seeing.
    If this does not work you may need to export as Apple Intermediate Codec and run it through JES Deinterlacer.
    Uploaded with plasq's Skitch!

  • Line with red blob

    What is the line with a red marker on its left-hand end, in iCal's weekly view????

    Hey Andy,
    That is a time-of-day marker, I believe.

  • Ipod to tv white/black fuzzy lines

    please help and advise if im doing something wrong.i have the ipod setting on tv set to on,set at pal(have tried ntsc still same)when i plug ipod into tv to watch video/photos all i get is black/white fuzzy lines across screen,thought at first cable faulty but have now tried a second cable still the same issue.what am i doing wrong has anyone had same problem and sorted it.please advise...thanks

    there will always be ways to get around purchasing something from apple for those who are so inclined. the link i included above shows the difference in wiring, and sure, you can swap / rewire / cut / change your existing cables if you like. it shows you how to wire to an ibook av cable which is the same as a standard DV from what i understand. it's your ipod, and you can plug whatever you like in it.
    me, i personally like to use things the way they are intended, and unless there is a third party, informally endorsed version that does it better, i like to kee it in the family. the ipod is (as the rest of the apple family) an expression of style and a design statement. it's for the same reason i wouldn't want to have a black cord connecting my ears to my music - the white cord(s) are part of the (admittedly grandiose) ipod brand and culture. i don't only use mine in my living room, but for presentations in boardrooms too, and the entire package from my pocket is more impressive than an old lumpy laptop...
    it's personal preference. but IMHO, if you can spring for the apple AV's, i would do it...

  • Open item account line with flow type has to contain a partner

    Hi,
    I am getting the following error while doing periodic posting in flexible real estate management.
    " Open item account line with flow type Z240 has to contain a partner"
    " Open item account line with flow type Z820 has to contain a partner"
    Message no. RERACA005
    I have found a similar message in this forum.
    This error is not coming for other flow type Z120 in the contract.
    The accrual type for accruals is set  as ANRVCN and Accrual type for deferrals is set as TRRVCN in the definition of flow type with S Debit posting.
    For ANRVCN , posting supported is " Only periodic"  and for TRRVCN " All"
    Please guide as to where I need to check and correct.
    Regards,
    T Saravanan

    Hi Saravanan.
    I have the same problem, could you help me to solve it?
    thanks in advance!
    Lucas

  • Schedule Lines with Firm

    Hi Gurus,
    I have an Issue in Schedule lines. Delivery schedules lying with in the firm zone has firm indicator 1(Firm zone) in ME33l. The same schedule line shows in MD04 with * Symbol as firmed. In some of the cases Delivery schedules push out from the Firm Zone does not have a Firm Indicator in ME33l but it is firmed in MD04 with * symbol.In which table & field I can Identify the Firmed schedule lines with * symbol in MD04.Please Help me.
    Regards,
    Senthil.K

    Delivery schedules lines are populated when MRP is Run.
    symbol indicates that you have done manual intervention in the purchase order mentioned.
    In MDO4 you can see * symbol
    Ganesh kumar

  • How do you get a line with MULTIPLE fields to WRAP ?

    How do you get a line with MULTIPLE fields to WRAP ?
    Good afternoon everyone...
    THE PROBLEM: Why doesn’t a line with multiple fields WRAP?
    HYPOTHETICAL EXAMPLE/WHAT I”D LIKE TO SEE
    If I have 2 fields on a line (this is now a hypothetical example and nothing to do with my actual report)….let’s call them field A and field B. And if field A has values of all ‘X’ and field B has values of all ‘Y’…then….the normal case would be (ignore dots – only for spacing):
    A……………………… B
    XXXXXXXXXXXXXXXXXX YYYYYYYYYYYYYYYYY
    But what if A is too long? I would want to see B wrap onto the next line like this:
    A……………………………………………………B
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX YYYYYY
    YYYYYYYYYYYYY
    And similarly….if B is extra long, can the line print as:
    A………………………. B
    XXXXXXXXXXXXXXXXXXX YYYYYYYYYYYYYYYYYYYYYYYYYYY
    YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
    I don’t want the case where B is long and I get:
    A………………… …B…
    XXXXXXXXXXXXXXXXX YYYYYYYYYYYYYYYYYYYYYY
    ………………………..YYYYYYYYYYYYYYYYYYYYY
    I can see how you can wrap an individual field like that…but how can you WRAP a line of[b] fields within the frame so it wraps to the BEGINNING of the frame on next line?
    My SPECIFIC CASE
    I have a report that I have stripped down to a simple structure for the purposes of this explanation.
    My DATA MODEL has the main QUERY (for plant family and species data). The columns of the query are divided into 2 groups. The 1st GROUP contains the family data. Below that is the rest of the species data in a 2nd GROUP.
    Linking from the 2nd species group (above) is a new QUERY to extract REGION data based on the common key field. Under this 2nd query is another group with all the REGION columns.
    The LAYOUT MODEL has a group frame (the main , base one)
    On top of this is a repeating frame based on the 1st group (family data).
    On top of this is another repeating frame for the 2nd group (species data).
    On top of this is 2 Frames on the same line line. The 1st frame contains columns from the species group .
    The 2nd frame on this line is a repeating frame. The PRINT DIRECTION for this frame is ACROSS/DOWN. It repeats details of the REGION where the species is found. These columns come from this group come from the REGION QUERY and GROUP.
    All fields on the report line have variable horizontal elasticity.
    The problem is that when there is too much data on the line, it does NOT WRAP to the 2nd line.. It TRUNCATES.
    Can the line be made to WRAP????..
    In my current report, 1 of 2 things is happening:
    1) All fields print on the line until it hits the page boundary and then it just stops. Truncated!
    2) All fields print on the current line, then Oracle Reports throws a new page to print the REMAINDER of the long, input line
    But I would like a LONG line to continue printing onto the following line of the same page.
    I have tried all combinations of the elasticity fields and the ‘ADVANCED LAYOUT’ properties.
    I have been focussing my attention with this problem on the frames .
    We are using REPORT BUILDER V 6.0.8.26.0
    Thankyou to anyone who may offer assistance.
    Tony Calabrese.

    Steve,
    you gain 1 thing, but you lose something else!
    This thing is SO frustrating!
    Hey Steve! Good afternoon.
    I've done as you suggested....I have a long text boilerplate item - the only 1 on the line...and it has all the column in it.
    So it looks like:
    &col1 &col2 &col3 &col4 &col5 etc etc etc
    And the line expands nicely to each field's requirements.
    And when it gets to the right page boundary...it WRAPS to the next line! Beautiful!!!
    The only thing is that...when I had individual fields across the line I was able to create format triggers for those fields. And in doing so I was able to reduce the font and change the justification. I had to do that because some of the fields had to appear superscripted.
    So I wanted something like (ignore the dots):
    ...................................ppppp
    AAAA BBBB CCCCC DDDD EEEE FFFFFF
    So the field of 'ppppp' appeared slightly higher on the line than the other fields...
    I can't see how I can do this with a single TEXT field containing all the &COL values.
    Have you ever come across anything like this?
    Thankyou again,
    Tony Calabrese 12/4/2007

  • How can I print the "number lines" with the code in Visual Studio?

    How can I print the "number lines" with the code in Visual Studio?

    Hi BillionaireMan,
    What about your issue now?
    If you have resolved it, you can share the solution here, which will be beneficial for other members with the same issue.
    If you did not, please tell us more information,we will try my best to help you.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Can you switch to alternate phone on line with edge payment?

    I have a need to temporarily from time to time switch to an alternate phone on a line I currently have Edge payments on.  I will continue to keep and use the phone I'm making edge payments on, but if I take the SIM out and put it in another phone for a few days, will that affect my monthly Edge payments?  I won't be putting a different SIM in the phone I'm making payments on.
    Anyone have experience with this?

    lewisr13 and mrhelper thanks for the responses.  To clarify, I have an iPhone currently on a line with edge payments being made on that phone.  I may temporarily from time to time need to switch to an Android phone on that line.  I would like to keep making Edge payments on that iPhone and not have to pay it off all at once if I switch to the other phone temporarily.  I have no plans to put the iphone on another line during that time and that Android phone won't be purchased via that line or any other line on my account.  It would be simple swapping of SIM from iPhone to Android phone and back.
    I'm just trying to avoid getting hit for the whole cost of the iPhone at once and prefer to keep my monthly Edge payments for it...that's my primary goal or what I want to understand.

  • With header line & with out header line ?

    what is difference between with header line & without header line ?

    When you create an internal table object you can also declare a header line with the same name. You can use the header line as a work area when you process the internal table. The ABAP statements that you use with internal tables have short forms that you can use if your internal table has a header line. These statements automatically assume the header line as an implicit work area. The following table shows the statements that you must use for internal tables without a header line, and the equivalent statements that you can use for internal tables with a header line:
    Operations without header line
    Operations with header line
    Operations for all Table Types
    INSERT <wa> INTO TABLE <itab>.
    INSERT TABLE ITAB.
    COLLECT <wa> INTO <itab>.
    COLLECT <itab>.
    READ TABLE <itab> ... INTO <wa>.
    READ TABLE <itab> ...
    MODIFY TABLE <itab> FROM <wa> ...
    MODIFY TABLE <itab> ...
    MODIFY <itab> FROM <wa> ...WHERE ...
    MODIFY <itab> ... WHERE ...
    DELETE TABLE <itab> FROM <wa>.
    DELETE TABLE <itab>.
    LOOP AT ITAB INTO <wa> ...
    LOOP AT ITAB ...
    Operations for Index Tables
    APPEND <wa> TO <itab>.
    APPEND <itab>.
    INSERT <wa> INTO <itab> ...
    INSERT <itab> ...
    MODIFY <itab> FROM <wa> ...
    MODIFY <itab> ...
    Using the header line as a work area means that you can use shorter statements; however, they are not necessarily easier to understand, since you cannot immediately recognize the origin and target of the assignment. Furthermore, the fact that the table and its header line have the same name can cause confusion in operations with entire internal tables. To avoid confusion, you should use internal tables with differently-named work areas.
    The following example shows two programs with the same function. One uses a header line, the other does not.
    With header line:
    TYPES: BEGIN OF LINE,
    COL1 TYPE I,
    COL2 TYPE I,
    END OF LINE.
    DATA ITAB TYPE HASHED TABLE OF LINE WITH UNIQUE KEY COL1
    WITH HEADER LINE.
    DO 4 TIMES.
    ITAB-COL1 = SY-INDEX.
    ITAB-COL2 = SY-INDEX ** 2.
    INSERT TABLE ITAB.
    ENDDO.
    ITAB-COL1 = 2.
    READ TABLE ITAB FROM ITAB.
    ITAB-COL2 = 100.
    MODIFY TABLE ITAB.
    ITAB-COL1 = 4.
    DELETE TABLE ITAB.
    LOOP AT ITAB.
    WRITE: / ITAB-COL1, ITAB-COL2.
    ENDLOOP.
    Without header line:
    TYPES: BEGIN OF LINE,
    COL1 TYPE I,
    COL2 TYPE I,
    END OF LINE.
    DATA: ITAB TYPE HASHED TABLE OF LINE WITH UNIQUE KEY COL1,
    WA LIKE LINE OF ITAB.
    DO 4 TIMES.
    WA-COL1 = SY-INDEX.
    WA-COL2 = SY-INDEX ** 2.
    INSERT WA INTO TABLE ITAB.
    ENDDO.
    WA-COL1 = 2.
    READ TABLE ITAB FROM WA INTO WA.
    WA-COL2 = 100.
    MODIFY TABLE ITAB FROM WA.
    WA-COL1 = 4.
    DELETE TABLE ITAB FROM WA.
    LOOP AT ITAB INTO WA.
    WRITE: / WA-COL1, WA-COL2.
    ENDLOOP.
    The list, in both cases, appears as follows:
    1 1
    2 100
    3 9
    The statements in the program that does not use a header line are easier to understand. As a further measure, you could have a further work area just to specify the key of the internal table, but to which no other values from the table are assigned.
    Internal table with header line
    you can use anywhere except obkect oriented concept.
    Internal table without header line :
    You should use in Object oriented concept..
    Always try to use without header line,performance point of view it is best..
    Example :
    Without header line.
    Structure
    types : begin of ty_itab ,
    matnr type mara-matnr,
    end of ty_itab.
    Internal table
    data i_itab type standard table of ty_itab .
    Work area
    data wa_itab like line of i_itab
    With header line
    data : begin of i_itab occurs 0,
    matnr like mara-matnr,
    end of i_itab
    itab with header lines are obsolete, anyway it will work but not recommended. instead use work area or more effiecient is field symbols. so donot use itab with header line.
    i will explain use of itab w/o header line.
    Data: itab1 type standard table of mara with header line occurs 0,
            itab2 type standard table of mara,
            wa_itab2 type mara.
    loop at itab1.
    "This will work fine.
    endloop.
    loop at itab2.
    "This will give erro that itabd does not hav workarea
    endloop.
    "so write
    loop at itab2 into wa_itab2.
    "This will work
    endloop.
    <b>The difference between
    whih header line and with out heater line of internal table.
    ex:-
    a) Data : itab like mara occurs 0 with header line.
    b) Data: itab like mara occurs 0.
    -While adding or retrieving records to / from internal table we have to keep the record temporarily.
    -The area where this record is kept is called as work area for the internal table.
    -The area must have the same structure as that of internal table. An internal table consists of a body and an optional header line.
    -Header line is a implicit work area for the internal table. It depends on how the internal table is declared that the itab will have the header line or not.
    a) Data : itab like mara occurs 0 with header line.
    table is with header line
    b) Data: itab like mara occurs 0.
    table is without header line</b>
    regards,
    srinivas
    <b>*reward for useful answers*</b>

Maybe you are looking for