Can I make a TexturePaint  than do not is not AffineTransformed?

I like to to paint shapes with a TexturePaint that remains the same independent of scale, I had traied to create a Texture with a simple BufferedImage but the AffineTransform applied to the Graphics2D modify the image, making the pixels bigger when zooming, that is not my intention.
I also tried to override the createContext method of TexturePaint to return the same image everytime, but it works for some shapes but not for others (for complicated shapes). I really do not understant how the TexturePaint works.
Tanks in advance..

I would prefer another solution.
The better way is to normalize transform before using textture paint and restore graphics' transform after.
public void paint(Graphics g) {
  Graphics2D g2d=(Graphics2D)g;
  AffineTransform oldTransform=g2d.getTransform();
  g2d.setTransform(normalTransform);
  g2d.setPaint(yourTexturePaint);
  //paint something
  g2d.setTransform(oldTransform);
}regards
Stas

Similar Messages

  • How can I make a drawing stable and not disappear?

    When I draw some shapes in a panel, if another window goes over the panel, then the drawing disappears and I have to draw it again.
    How can I make the drawing stable?

    Encephalopathic wrote:
    Of course you've read the graphics tutorials, and you are doing all of your drawing in a paintComponent(Graphics g) method override, correct?Encephalopathic is correct. If you want the stuff you draw to persist, you should override paintComponent() and redraw everything there. Just because you've drawn something on a component once (say, a line or an Image) does not mean it'll be redrawn the next time the component needs to be painted. You have to re-draw your custom stuff every time a repaint event is sent to the component, and that means overriding paintComponent().
    If your component will have lots of custom painting done to it (such as if you're making a MS Paint-style program), you might want to consider drawing to a BufferedImage, then in your component's paintComponent() override, just rendering the BufferedImage. Check the documentation for more details.

  • TS4079 I can only make international calls with siri, not local calls

    I live in Burundi, with the country code +257. I can make calls to the US, Canada and Europe but I can't make local calls. I have tried all the troubleshooting tips and tricks, checked my settings etc. Any ideas?

    You also posted this on an iPhone forum. Not sure why you posted it here on an iPad forum.

  • How can i make only text slider? Not picture use

    Hi!
    I want to text slider. 1 group 3 items has 5 text group changing fade effects?
    Thank you?

    This should do it ...
    1. Under widgets ... place a Blank Composition widget onto your Muse page
    2. Create a normal text box (however big you want) and fill that with the required text you want shown for your 1st slide
    3. Select the 1st (small thumbnail) box underneath the slideshow ... there's 3 shown by default
    4. Click and drag the text box, you created, onto the Blank Composition widget ... you will notice the widget box will give a BLUE outline ... this is showing you that you are adding the text box to the Blank Composition widget ...
    5. Center or place your text box accordingly ... change your Font, colours, formatting, etc to the way you want it
    6. Repeat this for however many text slides you need ... but select a different thumbnail box for each slide ... to add more than the 3 boxes shown just click the little '+' sign next to the thumnail boxes
    7. Under the properties panel for the Blank Composition (you know that small Blue circle and white arrow icon?) select Fading under Transistions
    8. Preview and edit your slide show accordingly
    That should be it ... you can add most things in the compositon widgets ... I actually use the TEXT option to show testimonials ...
    cheers,
    GemBro

  • If You Sync Notes Via iCloud, How Can You Make Local/On My Mac Notes?

    I've you're using the Notes app in Mountain Lion, and your Notes are stored in iCloud, is it possible to make notes that are just On My Mac and not in iCloud? If so, how do you do it?

    Choose Apple menu > System Preferences, and then click Mail, Contacts & Calendars.Open Mail, Contacts & Calendars preferences
    Set up an account with Notes:
    For an existing account:
    Select the account, and then select the Notes checkbox.
    For a new account:
    Click an account type, enter your account information, and then follow the onscreen instructions.
    I didn't need to set it up in ML but here's what Help has to say...

  • How can I make screen bigger than the 2 inch square for Quicktime playback

    My playback of videos with Quicktime has viewing area of about 2 inches square. How do you make it larger for video viewing?

    Note that if the video is in a low resolution (as would seem to be the case given the native window size), expanding the window will yield a fuzzy picture, more so the larger you expand the window.

  • I want to switch to firefox from Explorer, but somethinbg called Imesh keeps coming up when i try to get to firefox. How can i make firfox my browser and not Imesh?

    I have beeb using Explorer on my laptop that came with Vista home premiun. (unfortunately). Explorer keeps crashing. i want to switch my browser to Firefox, but when I try I keep getting something called "Imesh" that appears to be posing as Firefox.

    From what I understand Imesh is P2P software used to download various things. (Like Limewire.) I would just uninstall Imesh. My favorite utility to uninstall stuff is ccleaner, it makes uninstalls quick and painless. You can download it at http://www.piriform.com/ they make great free ware.
    Now that the Imesh is removed do you have Firefox installed? When you install Firefox it will ask you if you want to use it as the default browser.
    I hope this helps, if you wish to continuing various downloads with out the typical "P2P" silly stuff check in to torrents.
    Have a nice day.

  • How can i make sure my phone is not on jailbrake

    need to make sure that my phone is not jailbroken

    Did you jailbreak it?
    Did you leave in someone else's possession long enough to perform a jailbreak?
    Why do you suspect it is jailbroken?

  • How can I make sure that Iphone does not remove IMAP emails?

    Emails that I get first on my iPhone are not on my other computer later. Is there some setting to make sure things are not removed?

    Check to see if the account is set up correctly. Al roaminggnome said, this is not how IMAP behaves. Unless...
    If it is set up as IMAP, when you delete a message on the phone, it will delete it from the mail store on the server, meaning it will not download to other devices.  That's the way IMAP is supposed to behave.

  • Can I make it shuffle playlists but not shuffle albums?

    Whenever I select an artist or playlist, I want the music to be shuffled; but when I select an album, I want it to play the album in order. Right now I go into settings and toggle the shuffle off or on. Is there any way to make the albums play in order without taking this step each time?

    No.

  • Mac Mail - Can I make emails in smart mailboxes not show in my inbox?

    Hi,
    I am running several mail accounts on mac mail. I just set up a bunch of smart mailboxes which are working but the emails in those smart mailboxes are still showing up in my inbox? I thought the purpose if mailboxes (smart or not) was to reduce your inbox volume?
    Does Lion or any other 3rd party mail apps do this? Thanks.
    OK sorry forum and Apple bandwidth and Storage..ha I didn't look hard enough at the forum...found my answer which is to create regular mailbox and set up a rule.
    Message was edited by: davidgisme

    Smart Mailboxes do not remove mail from where they are stored. They only serve to help you to organize and find spefific criteria quickly. They don't perform actions.
    If you want to move messages, you could try creating mail rules to perform actions, such as moving messages. You will have to look to see if rules support the criteria you're looking for. Mail/ Account Preferences/ Rules

  • How can i make iphone overwrite computer calender NOT other way round?

    Hi, when I sync with Outlook, the calender overwrites my iphone which has just wiped out all the new entries I made on iphone calender! Thanks in advance

    Hi, I also have a similar issue. Just bought a new laptop operating on Win 7. I was able to sync my iphone to my old laptop (old version of Windows) and vice versa. I downloaded the latest version of ITunes onto the new laptop. While ITunes could detect my iphone, I can't select the "Transfer Purchases from ipod" option from the "File" menu. It's "greyed out". Any idea how I can proceed?
    Thank you!

  • How can I make it so I'm not required to activate addons for each website?

    With the new firefox patch last week, every time I go to a website with a pdf I have to click to allow adobe acrobat unless I want to use firefox's crappy pdf reader. Same for other addons like silverlight, java, etc.
    Is there any way to avoid clicking this at every site I go to for every addon I want to use? Or is it time to uninstall firefox and just use Chrome?

    That's strange. Setting "Always Activate" on the Add-ons page definitely should bypass the message. While it is possible to override that on a site-by-site basis, the global setting should be sufficient.
    Could you check another way:
    (1) In a new tab, type or paste '''about:config''' in the address bar and press Enter. Click the button promising to be careful.
    (2) In the search box above the list, type or paste '''plugin.st''' and pause while the list is filtered
    Do you see any of these (indicating "Always Activate"):
    * '''plugin.state.java''' set to 2 (Java Platform SE plugin)
    * '''plugin.state.npctrl''' set to 2 (Silverlight plugin)
    * '''plugin.state.nppdf''' set to 2 (Adobe Acrobat plugin)

  • At the bottom of an account website, a VeriSign gold padlock is visible on a horizontal bar. This bar takes up needed screenspace on this site. Can I make it so firefox does not display this bar? (even if it needs to be done manually each time). Thanks!

    Here is a screenshot of the horizontal bar with the VeriSign padlock:
    [http://i239.photobucket.com/albums/ff318/jonjans/misc/authbyveris.jpg]
    Thank you for any help or ideas!
    Firefox 3.6.12 (and updated automatically)
    XP Pro 32

    View > Statusbar = un-check it to hide it

  • Can i set the policy in code not in a policy file

    normally starting rmi client with a policy file. and start the client with such JVM parameters: java.security.policy and java.rmi.codebase.
    But in jsp how can i specify these JVM parameters.Or can i make the policy in code not in
    a file.

    You can specifiy inline with code otherwise malicious code would use it the grant all permissions before it wrecks havoc on the system.
    When your Servlet engine starts (Tomcat, JBoss, depends on which you are using) there will either be an option to pass in additional policy file, or a policy file will exist inthe servlet engine directory path for you to edit and add your entries to.

Maybe you are looking for

  • Adding Day, Month, Date,Year, Time to Menu BAR

    My Menu bar now shows "Thu 9:14 PM". I want to change it to Day, Month, Year, and Time. I presume this is done by Apple>System Preferences>Language & Text>Formats>Customize, but I can't get any further, and the words "Type text and drag element to cr

  • Intermitent Eject symbol by Network icon in Finder pane

    Please can anyone tell me why sometimes (and only sometimes) I get an eject symbol next to the network icon in the left pane of Finder windows? Pressing it does nothing. I wouldn't say I connect to a network but maybe I do and misunderstand the termi

  • Why does AE's 720 become QT's 654??

    Hi - I have a project where I need to work in 720x480 to satisfy specs http://vpcinc.net/ftp/RCA/Masons Spots/OMC Encoding Standards.doc. So  - I'm using NTSC DV settings in AE CS5.5 (Mac).  The new comp dialog says 720x480 and I thought I'd be golde

  • Need several variants in VL10A

    Hi all,   In VL10a, there is a custom variant setup with' User-specific' and 'Default setting' being selected. I now need to create another variant for this same user with a different name and remove the default setting and user-specific.  Now none o

  • How to make redirects work with NSAPI plug-in

    We have a NSAPI plug-in on a Iplanet server which routes any URL request with "weblogic" on it to a WebLogic server with a PathTrim. eg. http://ksopsd01/weblogic/myapp/login.jsp. All my forwards are working fine except any redirection. My redirects f