Problem displaying cards in a card game around in a circle!!

From: ***C.Steamer*** (iamcleaver_at_shaw.ca)
Date: 09/29/04


Date: Wed, 29 Sep 2004 06:34:21 GMT

Basically I am designing a graphical card game and I want to display the
cards around the display area in a circled form, just like you would at a
real card table. Now I have a render function render(Graphics g) and somehow
I want to be able to translate the graphics context to the points around the
circle. Trick is that I would also like to be able to deal the cards
according to the number of players and space them out equally around the
circle. Say 2 players I want to deal at bottom of screen and at
top(basically 180 degrees) and if there is say 6 players I want to deal the
cards at every say 60 degrees; So I have figured that I need to translate
the graphics context around this circle to draw each card but I don't know
how to do that. I have figured the point around the circle must represent
the center point of the card to make it look symmetrical, but I don't know
how to get the Graphics.translate() function to stop at these places so I
can draw my card. Any help would be great.

Basically I have this for code
public void render(Graphics g)
{
for(int i=0;i<playerController.getPlayerCount();i++)
    {
        Player player = playerController.getPlayer(i);
        CardGraphic cardGraphic = new
CardGraphic(player.getLastCardPlayed());
        // her i need to go g.translate(someLocation)
        cardGraphic.render(g);

}

Thanks Alot



Relevant Pages

  • Re: Disabled parking badges
    ... >>> Does anyone know which is the front side of the card? ... >> It's the Circle Of Stars side. ... They need to see the expiry date, ...
    (uk.media.radio.archers)
  • Re: How do I make my words appear around a circle?
    ... want to fill in a circle. ... I am hoping to create some verses on a ... card, with a smbol/picture in the middle. ...
    (microsoft.public.publisher)
  • Re: BLOCKDRIVER
    ... I just wanted to circle back and post the solution to the problem that I was ... VB6 and set a reference to hotplug.dll, then I looked at the object browser. ... if the card is not in the system and 1 if the card is in the system. ...
    (microsoft.public.vb.general.discussion)
  • Re: Disabled parking badges
    ... >> Does anyone know which is the front side of the card? ... > It's the Circle Of Stars side. ... They need to see the expiry date, ...
    (uk.media.radio.archers)
  • Re: Video card support under TRU64 5.1b
    ... has a PowerStorm 4D50T graphics card. ... Some of the PWS's had graphics cards where you had to set the ... To change to a different resolution from default, ... basic VGA support and it sounds like no X server is starting up. ...
    (comp.unix.tru64)