Painting area between two nested arcs ?

Hi,
Is there anyone that can provide a solution for this problem ?
Can't use a loop drawing smaller arcs since I need to paint the area with a gradient.
I tried to append the inner arc to a GeneralPath derived from the outer arc but
It doesn't work.
This was my attempt :
Arc2D.Float arc2D = new Arc2D.Float(20.0f, 20.0f, 160.0f, 160.0f, 0.0f, 180.0f, Arc2D.CHORD);
GeneralPath generalPath = new GeneralPath(arc2D);
generalPath.setWindingRule(GeneralPath.WIND_EVEN_ODD);
arc2D.x += 20;
arc2D.y += 20;
arc2D.width -= 20 << 1;
arc2D.height -= 20 << 1;
generalPath.append(arc2D, true); // true or false
graphics2D.setPaint(gradient);
graphics2D.fill(generalPath);thanks in advance
Lucio

Stupidity ? well yes
Here's the solution :
Arc2D.Float arc2D = new Arc2D.Float(20.0f, 20.0f, 160.0f, 160.0f, 0.0f, 180.0f, Arc2D.CHORD);
GeneralPath generalPath = new GeneralPath(arc2D);
generalPath.setWindingRule(GeneralPath.WIND_EVEN_ODD);
arc2D.x += 20;
arc2D.y += 10;
arc2D.width -= 20 << 1;
arc2D.height -= 20 << 1;
generalPath.append(arc2D, false);
graphics2D.setPaint(gradient);
graphics2D.fill(generalPath);

Similar Messages

  • Fill area between two lines

    Hello again.
    I made two lines with the arc tool, but how I can fill the area between the two lines red ?
    http://s7.directupload.net/images/130830/mbqw2prt.png

    Which version of Illustrator are you using?
    In case it's a recent one take a look at Live Paint groups and the Shape Builder tool.

  • Screen painter space between two element in one line

    Hi Experts,
    i am developing a RF program with screens of size 16linesX20columns. limited space should be used . But when i create more than one element in one line , one space is always present between two elements,and the space can not be deleted or overlaped. because of this, elements can not get enought columns.
    i am sure that elements can be adjacent without space in the past time. i am not sure space appear after what changes was done by me...
    can you please give some suggestion if you also have the same issue.
    Yimeng

    Hi,
    Can you elaborate which screen elements are you using.
    You can place screen elements one after another in a single line without any spaces.
    Danish.
    Edited by: Danish2285 on Sep 21, 2011 12:38 PM

  • Join between two nested tables question

    Hi. I have two nested tables with a join statement drawing info from both. The query looks like this:
    select to_char(N.LASTLOGONDATE, 'YYYY'), count(n.u_name), A.ACCOUNTDISABLED
    from coclastlogon, TABLE(COCLASTLOGON.RLLS) N , userpwaudit, TABLE(USERPWAUDIT.PVSS) A
    where N.U_NAME = A.USERNAME (+)
    and coclastlogon.AUDITID = 12
    and userpwaudit.AUDITID = 12
    group by to_char(N.LASTLOGONDATE, 'YYYY'), A.ACCOUNTDISABLED
    The query runs fine except its not generating non-matching values from the A.ACCOUNTDISABLED field. It is my understanding that placing the (+) will instruct the statement to add these columns to the result. If I use the same query with the same unnested data it produces the non-matching result set as I require.
    My feeling is there might be an issue with the way I've set my "FROM" but I'm not too sure how to proceed.
    Any suggestions?
    Thanks!

    You're right, by non-matching I mean null values.
    Running the query I wrote returns this result:
    (N.LASTLOGONDATE,'YYYY') / COUNT(N.U_NAME) / ACCOUNTDISABLED
    2005 3408 No
    2002 1 Yes
    Running the query using un-nested data returns this result (this is what I'm after):
    (N.LASTLOGONDATE,'YYYY') /COUNT(N.U_NAME) /ACCOUNTDISABLED
    2005 3408 No
    2002 1 Yes
    2005 27 -
    As you can see, the value I'm after is the one with ACCOUNTDISABLED 'null' value. Essentially, "coclastlogon, TABLE(COCLASTLOGON.RLLS) N" has more values in the N.U_NAME column than the table it is being joined to. That is why I added the (+). I just need to account for all values in TABLE(COCLASTLOGON.RLLS) than just the ones that find a join with "userpwaudit, TABLE(USERPWAUDIT.PVSS) A"

  • Select Between Two Dates ELSE

    I can't really seem to get this straightened out.
    SELECT distinct DATE, gross_total_return
    FROM WPI_ICL
    CASE Between '01-01-1980' AND '09-30-2008'
    AND description = 'Broad Market Index United States Property (US Dollar)'
    ELSE
    description = 'S&P United States Property Residential (US Dollar)'
    END
    So, if records are between two dates, select a certain description, ELSE select a different description.  I've tried IF...Then, and I've tried Case too.  So far, nothing has worked out.
    Can someone please give me a point in the right direction?
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Here's a working example:
    DECLARE @wpi_icl TABLE (date DATE, gross_total_return FLOAT, description1 VARCHAR(100), description2 VARCHAR(100))
    INSERT INTO @wpi_icl (date, gross_total_return, description1, description2)
    VALUES
    ('2008-09-29', 100.0, 'Broad Market Index United States Property (US Dollar)', 'S&P United States Property Residential (US Dollar)'),
    ('2008-10-01', 200.0, 'Broad Market Index United States Property (US Dollar)', 'S&P United States Property Residential (US Dollar)')
    SELECT date, gross_total_return,
    CASE WHEN date BETWEEN '1900-01-01' AND '2008-09-30' THEN description1
    ELSE description2
    END AS description
    FROM @wpi_icl
    From the code you posted, it seems you're unsure of the syntax of CASEs.
    There are two ways to use a case. The first is the example above. You enclose the conditions between CASE and END.
    Each condition has its own WHEN with a clause that evaluates to true or false. This clause can be made up of as many conditions as you like. After the clause comes a THEN. This is essentially what you want to happen if the clause returns true. WHEN/THEN is
    synonymous with IF/THEN in this instance.
    Including an ELSE is optional, but, be aware if you do not, and none of your WHEN clauses evaluate to true, you will have a NULL returned.
    CASE
    WHEN theseDriods = theDriodsWereLookingFor THEN callVader
    WHEN theseDriods <> theDriodsWereLookingFor THEN moveAlong
    ELSE goHomeAndRethinkLife
    END
    The other (less common) option operates like a SWITCH in some other languages. Its still surrounded by CASE and END but this time, the when just contains a value to be compared to the value at the start of the case:
    CASE 16
    WHEN 15 THEN 'too low'
    WHEN 16 THEN 'just right'
    WHEN 17 THEN 'too high'
    END
    Hope this helps.

  • How to insert a local member in a column between two different nested row dimensions

    Hi Experts,
    We have a report which has two dimensions in rows with nesting. The dimensions are PROGRAMS and ACCOUNT.
    I have attached the layout of the report.
    We need to have a column for local member in between Col A and Col B, wherein we have to pull the long description of the program.
    We have long description of programs maintained in a property of PROGRAM dimension
    So if we can insert a column between Col A and Col B, we can have a local member in it with formula "EPMMemberProperty" refering to Col A
    Currently we are are not able to insert a local member in between Col A and Col B in EPM 10 SP 14 version because its not a data range
    I remember we used to do it in BPC 7.5 using expansion ranges to insert a blank column. So I believe similiar thing can be done in EPM 10
    I have tried the option of VBA macro to insert a column before Col A and populate the long description and then hide Col A. It works. But I dont want to complicate it with Macro, and want to use EPM functionality to achieve the same.
    Please advise if this is possible with BPC 10 to have a column for local member in between Col A and Col B.
    Thanks a lot in advance.
    Regards,
    Shiva

    Hi Sathish,
    Thanks a lot for replying. Since I had to insert the local member in between two dimensions, I couldnt use the position option in the local members. Because positions were staring from the data range.
    How ever I have tried the suggestion given by Varaprasad and Bishwajith above and it worked.
    Thanks,
    Shiva

  • XOR arc among  various relationships between two entities

    I have a scenarious where subtype is implemented as XOR arc among 1:1 relationships between two entities.Not familiar how to make the arc of exclusive or ..in SQL Modeler.
    Grateful for any direction.
    Kind Regards
    Ivan,

    Hi Ivan,
    here are steps for logical model (they are similar for relational model):
    1) select two (or more) relationships and entity they are connected to
    2) Click on "New Arc" icon to create arc
    Philip

  • TS3981 After migration files are now shared between two user accounts. How can I combine them into one account?

    After migration, from PC, files are now shared between two user accounts.I have to switch users to access files. How can I combine them into one account?

    See Pondini's  Transferring files from one User Account to another, for starters

  • Can I use Facetime between two devices which both are signed in to the same Apple ID?

    Can I use Facetime to communicate between two Apple devices which are each signed into the same Apple ID?

    Chris CA wrote:
    Phil0124 wrote:
    Yes.
    No.
    And use the new address to call that device.
    What new address?
    Perhaps you mean the OP needs to add a new email address for his AppleID and use that email address.
    Yes. That's what I meant.
    Change the "You can de Reached by Facetime At" for one of them under Settings->Facetime->You can be Reached by Facetimer At.
    I probably should have specified "Change the "You can de Reached by Facetime At"(email address) ...
    NOW TO CORRECT:  Even though I said you could, you can't.
    I tried this out just now and you can't facetime a device using the same Apple ID.
    So yes, you infact need another Apple ID for this. Not just another email address.
    My Bad. sorry.  I don't deserve the 10 points.

  • My assistant and I are using two Lightrooms (i.e. two serial numbers) and need to share between our two computers. I provide originals to her onto a flash drive. She tags them and returns them to me. I then copy the photos from her flash drive onto my com

    My assistant and I are using two Lightrooms (i.e. two serial numbers) and need to share between our two computers. I provide originals to her onto a flash drive. She tags them and returns them to me. I then copy the photos from her flash drive onto my computer and load them in my LR. The photos appear but witthout any editing or tagging. We need to be able to have her working on the photos on her computer with her copy of LR and me on my computer with my version of LR being able to access what is already tagged and given back to me. This seems hard. We need advice on if it is at all possible to have two computers simultaneously working on LR . I bought her her own version because I was told at the time of purchasing that that was the only way to share. Please advise urgently! Thanks.

    Sounds like your assistant isn't instructing Lightroom to write the tagging and editing to the files themselves, so wehn the files return to you, they don't have editing and tagging information. She need to select the photos in Lightroom and then Ctrl-S (Cmd-S on Mac). Or alternatively turn on the option to autmoatically write this information to the files.
    If you are using RAW photos, then this information will be written to a sidecar XMP file, and your assistant must provide you with the sidecar file. If these photos are not RAW photos, then the information is written directly into the photo file itself.
    Lightroom wasn't designed to be a multi-user program, and so it is truly not possible to have two people working on the same catalog at once. The way you are doing things, as modified above, is probably the way to go.
    As an alternative, you can transfer (portions of) catalogs as well as photos back and forth and then all of these issues disappear, but a catalog might be rather large for a flash drive (or maybe not, it depends)

  • Are there two type of associations between objects or are there just different representations?

    I've been spending some time on 're-tuning' some of my OOP understanding, and I've come up against a concept that is confusing me.
    Lets say I have two objects. A user object
    and an account object.
    Back to basics here, but each object has state, behaviour and identity (often referred to as an entity object).
    The user object
    manages behaviour purely associated with a user, for example we could have a login(credentials) method
    that returns if successfully logged in or throws exception if not.
    The account object
    manages behaviour purely associated with a users account. For example we could have a method checkActive() that checks if the account is active. The account object checks if the account has an up-to-date subscription, checks if there are any admin flags added
    which would make it inactive. It returns if checks pass, or throws exception if not.
    Now here lies my problem. There is clearly a relationship between user and account,
    but I feel that there are actually two TYPES of association to consider. One that is data driven (exists only in the data/state of the objects and the database) and one that is behaviour driven (represents an object call to methods of the associated object).
    Data Driven Association
    In the example I have presented, there is clearly a data association between user and account.
    In a database schema we could have the following table:
    USER_ACCOUNTS
    id
    user_id
    When we instantiate the account and
    load the database data into it, there will be a class variable containing user_id.
    In essence, the account object
    holds an integer representation of user through user_id
    Behaviour Driven Association
    Behaviour driven associations are really the dependencies of an object. If object A calls methods on object B there is an association going from A to B. A holds an object representation of B.
    In my example case, neither the user object
    nor the account object
    depend on each other to perform their tasks i.e. neither object calls methods on the other object. There is therefore no behaviour driven association between the two and neither object holds an object reference to the other.
    Question
    Is the case I presented purely a case of entity representation? The association between user and account is
    always present, but its being represented in different ways?
    ie. the user entity
    has an identity that can be represented in different forms. It can be represented as an object (the instantiated user object)
    or as a unique integer from the users table in the databases.
    Is this a formalised way of recognising different implementations of associations or have I completely lost my mind?
    One thing that bugs me is how would I describe the differences in UML or similar? Or is it just an implementation detail?

    It s a bit hard to fully understand what is problem actually in :). I think you are a bit mixing some concepts.
    Entities representation
    At first, all models we are implementing is just a simplification of some real-world objects and environment. Your conceptual entity user corresponds to some real user and contains some attributes we are intresteing in according to application needs. Thus there
    are some models we have to implement.
    Thus, all user defined by DB schema, user defined by class, and probably user defined by some presentation logic is normally present some real-world user. It is only about implementation purposes, we have to store, view and manipulate with user.
    On the other hand let's take a look on Single Responsibility Principle. It tells us to use every class or program unit just for certain needs. Using single user (class or program unit) for storage and presentation needs violates this principles.
    the user entity has an identity that can be represented in different forms. It can be represented as an object (the instantiated user object) or as a unique integer from the users table in the
    databases.
    So, the answer is yes.
    Associations and dependencies
    I think it is more about terminology than about nature of problem. But in general you are right - there are different types of object realtions (especially, I will use other terms to list it). For example "referencing", "creation", "using",
    "coordinating", "storing", "inheriting" (!) ....
    According to this, user instance references account instance. And A instance uses B instance.
    For most cases it is good enough to distinguish just "referencing" and "using". It is what you've just written. It's enough common and abstract to be understood by other person when talking about domain, e.g.
    But sometimes, to emphasize some aspects you should describe relations in a way like "A dispatches ensemble of Bs" or "R stores X to database". It's more applicable for specification and modelling.
    Is this a formalised way of recognising different implementations of associations or have I completely lost my mind?
    To call something formalized I suggest to look at UML.
    UML and other modelling instruments
    One thing that bugs me is how would I describe the differences in UML or similar? Or is it just an implementation detail?
    There are a lot of UML models (diagrams). Let's take a look at most well-known - Classes and Objects Diagram.
    It's interesting that UML allows to present all type of object relations, and moreover allows to decide "is it just an implementation detail".
    Martin Fowler describes 3 levels (or point of views) of understanding of Classes Diagram.
    Conceptual. Diagram is considered as high-level domain model, independent from implementation.
    Specification. Diagram is considered as high-level realization model containing of interfaces.
    Implementation. Diagram is considered as low-level technical paper containing interfaces, classes, references, other types of relations.
    Is this a formalised way of recognising different implementations of associations or have I completely lost my mind?
    Yes, you have to fix some point of view and choose appropriate relations set.
    For example, let's take a look at Classes Diagram and consider it from an implementation point of view. UML defines 3 type of relations (and propose corresponding means to its designation):
    Association
    Association corresponds "referencing" between instances.
    Dependency
    Dependency combines all types of relations such as "using", "creating", "storing", etc.
    Inheritance.
    Inheritances as a fundamental OOP instrument is presented by UML in a distinct way. It's more about classes than about instances, but also one can say that A instance inherit attributes of B instance. So, that's ok.
    First and second points of view on Class Diagram, as I remember uses only one type of relation unifying both associations and dependencies and is designated like association (no inheritance, of course).
    Also, UML proposes Objects Diagram which is same to Classes Diagram, but fits better for runtime modelling needs.
    Finally, a choice of a set of relations taken into consideration depends on a context and point of view. UML provides some ones.

  • Create relation between two blocks which are based on different procedure

    Hiii
    How to create relation between two blocks which are based on different stored procedures in Oracle form??
    Pradhyumn Sharma

    hiii,
    I selected the common key deptno in both procedure.
    I created a relation between both procedure. but when i compile the form it give an error in ON-CHECK-DELETE-MASTER. My procedure are
    ==================================
    PACKAGE emp_pkg AS
    TYPE emprec IS RECORD(
    empno asg_emp.empno%type,
    ename asg_emp.ename%type,
    job asg_emp.job%type,
    sal asg_emp.sal%type,
    deptno asg_emp.deptno%type);
    TYPE emptab IS TABLE OF emprec INDEX BY BINARY_INTEGER;
    PROCEDURE empquery(block_data IN OUT emptab, p_deptno IN NUMBER);
    end;
    ====================================
    PACKAGE dept_rec IS
    type rec is record(dname asg_dept.dname%type,
         loc     asg_dept.loc%type,
         deptno asg_dept.deptno%type);
    type deptrec is table of rec index by binary_integer;
    PROCEDURE dept_rec1(block1 in out deptrec);
    END;
    ===================================
    In ON-CHECK-DELETE-MASTER
    CURSOR BLOCK9_cur IS
    SELECT 1 FROM dept_rec.dept_rec1 d
    WHERE d.DEPTNO = :BLOCK6.DEPTNO;
    identifier dept_rec.dept_rec1 must be declared.
    Regards
    Pradhyumn

  • Can Partial Trigger Work between Two Components Which Are in Two Pages?

    Scenario: Some output text components in page one while a SelectOneChoice and a InlineFrame are in page two. At first the resource attribute of inlineFrame was set to point to page one. When changing the value of SelectOneChoice, the values of those output text will be expected to change accordingly. I tried to make SelectOneChoice to be the trigger of those output text components, but found that SelectOneChoice can't be seen when attempt to edit the value of PartialTrigger attribute of those output text components. Then I tried to set the ID of SelectOneChoice as the value of the InlineFrame component, but failed getting the wanted result again.
    Problem: How to get a partial refreshing effect between two components that are in two different pages? Can partial trigger work in this scenario?
    Thanks for your interest!

    Hi,
    Sorry, you can't achieve that the way you're doing it. If you're using 11g, however, you could do that using regions.
    Regards,
    ~ Simon

  • Arc between two points

    Hey Everybody!!
    I want to draw an arc between two points.. i can't seem to be able to figure the math but i'm sure this is fairly simple and somebody has done this before...
    Thanks in advance.

    that's correct...you need three points to define an arc..
    the reason i said two points is that i'm doing a diagram editor and i have to let the user connect pairs of objects using arrow, arcs, lines etc...
    any help is greatly appreciated...

  • Two overlayed painting areas

    I'm trying to implement Canvas with axes, which allows zooming by mouse dragging. But when I'm painting the zooming rectangle, it's neccesary to repaint the whole Canvas in each mouseDragged event. It causes blinking. Is possible to overlay two painting areas, one for my graphs and second for zooming rectangle (which should only be repainted when mouse dragged) ???
    Thank you very much
    Cechyn

    Two things come to mind
    With repaint(x, y, w, h) you will restrict the subsequent call to paint() to that area. Any drawing that paint() does outside of that area will be clipped. So when you decide to zoom, set the zoom param and call reapint() on just the zoom rect. See also Graphics.getClip() and Graphics.clipRect
    - or -
    Implment your component as a Container with two sub-components, one for each painting area. This seems the more OO

Maybe you are looking for