Showing posts with label graphics. Show all posts
Showing posts with label graphics. Show all posts

Friday, April 27, 2012

Is it possible to dither a gradient drawable?


I'm using the following drawable:




<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"
>

<gradient
android:startColor="@color/content_background_gradient_start"
android:endColor="@color/content_background_gradient_end"
android:angle="270"
/>

</shape>

Screenshot of the Nexus One from adb?


My goal is to be able to type a one word command and get a screenshot from a rooted Nexus One attached by USB.

Tuesday, April 10, 2012

Sunday, April 8, 2012

how to use an animated gif file in iphone application


i have an animated gif file and i want to use in my iphone application,but the animation doesnt work,anybody know how to fix it?

Friday, February 10, 2012

Hit test on Graphics2D object?


I have a few Graphics2D objects (Line2D, Rectangle2D, Ellipse2D, Rectangle2D) and a GeneralPath. I know that if I want to hit test on them I could use the .contains(Point) method, but I need to hit test on these objects when they are not filled in. So I just want to test if the user clicked on their border/line. I don't need to worry about the thickness of the border for now. Let's say that I just need to worry if the user clicked within 10 pixels from the border/line.

Friday, January 13, 2012

Drawing/warping a rectangular image into a quadrilateral image


I need to draw a BufferedImage within a given quadrilateral. I want to do that:

repaint() in Java


I write a Java code, but I have a trouble with GUI problem. When I add a component into JFrame object, then I call repaint() method in order to update the GUI but it doesn't work. But when I minimize or resize this frame, the GUI is updated.