paint

OpenGL ES on iPhone: timer-based painting problems, jitteryness

I have an OpenGL ES 1.1 project on iPhone, based heavily on the empty OpenGL ES application given here: http://iphonedevelopment.blogspot.com/2009/06/empty-opengl-es-application-project.html I'm testing on a 3G (not 3GS) device, 8GB. The paint loop in my app which does openGL operations is doing quite a lot each time it renders the sc...

Paint like Feature in Web.Application ?

Hello Guys, i want to implement Ms Paint like feature in my web application in c# asp.net. like cropping coloring zooming ,color picker etc . Please tell me is there any pre build tools or application for it.Any pointers and suggestion would be much appreciated. Thanks ! ...

Mixing two RGB color vectors to get resultant

I am trying to mix two source RGB vectors to create a third "resultant vector" that is an intuitive mix of the first two. Ideally, I would be able to emulate "real paint mixing characteristics", but for simplicity, I am trying to find a method where the resultant looks intuitively like what you'd get from combining the two source rgb's...

How to draw a picture instead of the slider on Qt QSlider?

I have created a class that inherits from QSlider. I want to draw a picture on the slider (grabber) instead of showing the plain one. How to do it? -- I found an answer and posted after I had received the reply. With due respect to the responder, I will choose that reply. However, I'd like to share code so that anyone with the same iss...

JMenuBar disappears when I add paint method

Im trying to use the following code to eventually make a game. The code, as shown below, works. import java.awt.event.*; import javax.swing.*; public class GUI extends JFrame implements ActionListener { public static void main(String[] args) { GUI g = new GUI(); } public GUI() { try { UIManager.setLookAndFeel(UIManag...

Paint background of JPanel

Hi everyone, How can I tell the paint method to draw background on JPanel only and not on the entire JFrame. My JFrame size is bigger than the JPanel. When I try to paint a grid background for the JPanel, the grid seems to be painted all over the JFrame instead of just the JPanel. Here parts of the code: public class Drawing extends ...

Java Updating Small Circles

I need to display a large number (500+) of small circles on a form to simulate LEDs. However, these circles need to be quite small, around 8 or 9 pixels diameter. So far, in my testing, I've put together some code that creates an Led class that uses a Shape (Ellipse2D.Double) and displays it directly on the JFrame from the JFrame's pain...

Maximum line length on Android TextView

I'm putting a formatted single line text (no \n's) to a noneditable TextView. In the navigation of the program, the text can be changed. On some text, the TextView shrinks to 0x0 pixel and I can see nothing! I added some menus to truncate the text 10 characters each time and I found that if the number of characters are larger than 4470, ...

Silverlight Paint control

I am looking for a very simple Paint control in Silverlight. It should allow the user to load an image as background, to paint simple shapes and to add text labels. ...

Qt painted content goes lost

Hi All, I am writing an info-screen program. I created a full-screen widget and draw contents onto it. In order to extend the life cycle of the TFT-display device, I want to implement a pixel-shifting feature. With other words, in every X minutes, I shift the screen to left/right/top/down for Y pixels. My approach is as follows: I ...

Win32: Does a window have the same HDC for its entire lifetime?

Am i allowed to use a DC outside of a paint cycle? Is my window's DC guaranteed to be valid forever? i'm trying to figure out how long my control's Device Context (DC) is valid. i know that i can call: GetDC(hWnd); to get the device context of my control's window, but is that allowed? When Windows sends me a WM_PAINT message, i am ...

How to paint contents in multi-thread using qt?

Hi All, I want to paint contents in a multi-thread application using qt. The qt runs in the main thread. I have a thread B to generate paint tasks and to send tasks to qt main thread. Currently, I call "mywidget.update" in thread B, the "mywidget.paintEvent(..)" will be triggered in main thread. My problem is that I cannot pass any o...

Why paint messages get lost even after calling UpdateWindow() ?

I have an application with following windows hierarchy: W1 -W2 (Child of W1) - W3 ( Child of W2) --------------------| | W1|------------| | | |W2 |------| | | | | |W3 | | | | | |------| | | | |------------| | |-------------------| When certain event happens in W2, I call UpdateWindow: W2::onCertainEvent()...

How to get the paint event for Buttons in QT

Hi.. i am new to QT, i tried lot searching samples of how to get the button paint event in QT.. i am not getting the way to do it.. how to set the delegates for pushbutton in QT?. how to get the paint event for pushbutton? i read so many articles, it says we can get the paint event of button we can customize too. but i didnt get the ...

Add transparent JPanel upon AWT Component to paint on

Hi, I've got a Problem: In my Java application I've got an AWT Component (cannot change that one) that streams and shows an avi-file. Now I want to draw upon this movie and thought about putting a transparent JPanel above it and draw on that one. This does not work since I either see the avi-stream or the drawn lines but not both. I r...

c# winforms drag and drop visualisations (painting)

Hello, I'm building a type of button grid, and the user needs the ability to drag and drop buttons to places within the grid (basically re-ordering). I have the drag and drop done but I want to add extra visual queues for the user. The problem is as far as I can tell the control doesn't repaint itself during the drag and drop process...

JComponent is not visible, anyone knows why?

Here's my JFrame code: public static void main(String[] args) { JFrame jf = new JFrame(); jf.setSize(600,600); jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); MyCustomWidget widget = MyCustomWidget.createWidget(400, 400); widget.setVisible(true); // just to set x and y widget.setLocation(40, 40); jf....

Instantiated components from within a thread aren't repainting into a JFrame in Java

Hi, I have a single class like this one public class BlockSpawner implements Runnable{ public static long timeToSpawn; private GtrisJFrame frame; public BlockSpawner(GtrisJFrame frame) { this.frame = frame; timeToSpawn = 2000; } public void run() { while(true) { try { Thread.sleep(timeToSp...

Saving a picture from a browser canvas.

Hello I'm currently developing a website in ASP .NET MVC and I require functionality for a user to be able to draw a picture on a canvas which can be saved in a database. What is the best method for doing this? preferably a very lightweight solution. I was thinking flash would be the most accessible platform and there may be some good f...

How do I paint the treeview node +/- buttons outside a treeview?

Similar to the ButtonRenderer class, I want to be able to paint the +/- buttons used in TreeViewNodes completely separately to any instance of a TreeView. There doesn't seem to be a ControlPaint method that does it, and drawing a Button doesn't look right. Where can I get the drawing code for a treeview node from? ...