I have a custom view that fills my entire screen. (A piano keyboard)
When a user touches the key, it causes invalidate() to be called and the whole keyboard gets redrawn to show the new state with a touched key.
Currently the view is very simple, but I plan to add a bit more nice graphics. Since the whole keyboard is dynamically rendere...
I want to write a navigator application, which draws maps from images. Maps need to be drawn dynamically, based on user's navigation. My idea is loading 9 images into memory, and then create a view to show needed map:
When user navigates, the view is moved. When needed, images which no longer seen will be destroyed, and new ones will ...
Hello,
I have a VisualBrush and need this VisualBrush as a Drawing. Anyone knows how this can be done? Thanks for any hint!
...
I'm trying to draw mirrored (as in, it looks like you held it up to a mirror) text, and I want to do it the easiest way possible.
It is possible to do a transform on a UILabel? Or do I have to use Quartz and do CGContextShowTextAtPoint() ?
...
I have an interface created with Glade. It contains a DrawingArea and buttons.
I tried to create a Thread to refresh every X time my Canva. After a few seconds, I get error messages like:
"X Window Server 0.0", "Fatal Error IO 11"
Here is my code :
import pygtk
pygtk.require("2.0")
import gtk
import Canvas
import threading as T
impor...
My android app draws a chart on a Canvas. It works fine in the simulator. On a real device the chart is clipped to the left 1/5 of the screen. I've tried:
canvas.clipRect(0, 0, canvas.getWidth(), canvas.getHeight(), Region.Op.REPLACE);
to clear the clipping. Am I missing something? Does layering have anything to do with this?
Tha...
i have my test.php:
<?php
echo "Image:<br/>";
include('draw.php');
?>
and my draw.php:
<?php
$img = imagecreate(250,80);
...
header("Content-type: image/jpeg"); imagejpeg($img); imagedestroy($img);
?>
now, visiting test.php tells me that headers is already sent. How do i show the image in draw.php "realtime" (not by saving t...
Hi,
In <insert non-IE browser here> there is the <canvas> element that allows for doing some fairly advanced drawing. In IE it's possible to draw with <div> elements, but that can get pretty slow if you're doing anything more than a few basic tasks.
Is there anything available in IE 5+, in pure HTML/CSS/Javascript, that can allows for ...
I was looking for it here in Stack Overflow as in Google, and I found a lot of packages to draw, but it seems a complex task, so I would like to know which is the most appropriate package to draw bars, and associate data to it. Also I was looking for a code example, but I did not have luck.
...
I want to draw graphs (nodes and edges) in Java. However, since I don't know how to go about it, I would like to have some advice before starting.
How should I do this?
use Graphics2D package, right?
How about the labels for the nodes? should I use something like drawString and handle all the "centering" manually or create a JLabel fo...
Given a series of points, how could I calculate the vector for that line 5 pixels away? Ex:
Given:
\
\
\
How could I find the vector for
\ \
\ \
\ \
The ones on the right.
I'm trying to figure out how programs like Flash can make thick outlines.
Thanks
...
I'm trying to implement line thickness as denoted here:
start = line start = vector(x1, y1)
end = line end = vector(x2, y2)
dir = line direction = end - start = vector(x2-x1, y2-y1)
ndir = normalized direction = dir*1.0/length(dir)
perp = perpendicular to direction = vector(dir.x, -dir.y)
nperp = normalized perpendicular = perp*1.0/leng...
XNA doesn't have any methods which support circle drawing.
Normally when I had to draw circle, always with the same color, I just made image with that circle and then I could display it as a sprite.
But now the color of the circle is specified during runtime, any ideas how to deal with that?
...
I want to learn how to draw shapes with wxWidgets. Where do I start? In case there are multiple ways, I prefer ease of use over cross-platform compatibility. I'm a Windows user.
...
Hi all,
I have an application in which I'm doing some custom drawing, a bunch of lines on a gradient background, like so (ignore the text, they're just UILabels):
http://prehensile.co.uk/outgoing/Screenshot2010-06-09at12.22.32.png
At the moment, that's all done by starting a new CGContext, drawing stuff into it with CGContextDrawLinea...
Does anyone have an algorithm for drawing an arrow in the middle of a given line. I have searched for google but haven't found any good implementation.
P.S. I really don't mind the language, but it would be great if it was Java, since it is the language I am using for this.
Thanks in advance.
...
I have a class Grid which produces a graph paper like grid on in the drawing area. I then have 5 other classes for different shapes to draw with; Line, Polygon, Ellipse, Curve, Arc
Now, these 5 classes use an instance of Grid because Grid has a resolution and a scale. Inside Grid I have:
public function set resolution(x:Number):void {
...
Hi all,
The issue is drawing an indexed image on an iPhone (1 byte pr pixel, 256 colors). You can easily convert a raw image to a CGImage if it is 24 or 32 bts per pixel RGB using 'CGBitmapContextCreate' and 'CGBitmapContextCreateImage' but it does not work with indexed images, I have searched in iPhone SDK documentation and the WEB but...
I'm starting to design a custom control with rather complex drawing. It will be a kind of chart (a kind of radar chart). It will be composed of a few axises with labels, line-regions (like spider-network) and filled shapes.
The main question is what's the difference between using Path control and Polygon control? What's better to use he...
Hi,
I am working on a read-along-book app for the iPad which is very similar to this Toy Story book ([url=http://itunes.apple.com/us/app/toy-story-read-along/id364376920?mt=8]Toy Story Read-Along for iPhone, iPod touch, and iPad on the iTunes App Store[/url]). So my question is how would be the best way to draw the text to the screen an...