Hi there!
I'm making a game which requires multiple images to be drawn on the screen. The code I'm using for this is:
- (void)drawRect:(CGRect)rect {
for (i=1;i<=totalImages;i++) {
if (imageExists[i]) {
[image drawAtPoint:CGPointmake(imageX[i],imageY[i])];
}
}
}
This drawRect is called by a function:
...
Hi
I am working with android, trying to animate some text (make it bigger and smaller over time) and I have the following issue. I cant animate the text using the following:
int textSize = calculateTextSize();
paint.setTextSize(textSize);
canvas.drawText("Some Text", 10, 25, paint);
calculateTextSize , shrinks or enlarg...
I am trying to draw a line
my Code is this
-(void) drawRect:(CGRect) rect
{
NSLog(@"Reached Draw ARect Function");
CGContextRef ctx = UIGraphicsGetCurrentContext();
CGContextSetLineWidth(ctx, 2.0);
CGContextSetRGBStrokeColor(ctx, 1.0, 2.0, 0, 1);
CGContextMoveToPoint(ctx, 0, 0);
CGContextAddLineToPoint( ctx, ...
Basically I've set up a class to handle sending WM_SETREDRAW messages like so:
public static class DrawingLocker
{
[DllImport("user32", CharSet = CharSet.Auto)]
private extern static IntPtr SendMessage(IntPtr hWnd,
int msg, int wParam, IntPtr lParam);
private const int WM_SETREDRAW = 11; //0xB
public stati...
I'm trying to draw a directed graph with labels on edges. I'm using graph# (graphsharp) and quickgraph, and I saw an explanation in the forums about how to add labels (it is not supported by the library), but cannot manage to implement myself. If someone could provide a working example using these two libraries I would be very thankful.
...
I'm developing a simple charting control to learn the ins and outs of the System.Drawing library. I'm at the part where I need to draw the axis labels. I'm assuming there is some standard process to get clean intervals using logs.
Can anybody provide some references or code that accomplishes the interval-ling of axises?
I'm specifi...
Hi,
I'm searching for a way to build a photoshop like drawing tool in ActionScript 3. Especially I want to build something like the brushes in photoshop. So that you can use different PNG's as a brush.
I tried it with saving a brush in photoshop as a transparent png, import it into my AS3 project and with a mouse move event, draw the p...
Say I have a button and want to change the background button to a gradient, is it better/faster to draw a gradient using Java2D or just get an image with that gradient and put it in the background of the button?
...
I would like to know how to draw a layer with some color [CGColorRef] in a window
When i am trying to addSubLayer to my window , the application is exiting without showing any exception.
...
How can I implement a view for users to draw in (specifically sign their name)? I would greatly prefer a library or sample code to implementing it myself.
Thanks
...
How would I draw outside the client area of a window, and on the title bar. I know it can be done, but I am unsure of how to implement this effectively. Think google chrome, where the tabs are on the title bar.
...
I heard that drawing abilities will be supported by Web 2.0
Tried to find something in Internet about, nothing really clear. Could you please point me into something that allows (or will allow in future) to draw in HTML?
For example: I want to have ability draw few hexagons in different color on the page.
Thanks.
P.S. Sorry if quest...
Just wondering how I might go about drawing arrow heads along a path. The path will change direction and go through several different points. The arrow heads are designed to show the user which direction along the path they need to travel.
I've tried to use a brush but it didn't work as I need the arrow heads to orientate them selfs al...
Hi All,
I am planning a apps which is similar as "ColorPlay" on the app store for my final year project.
I would like to do a fill in the color at the specified area on the image. Is anyone know how to do it?
Thanks alot
...
Hi Community,
I want to draw on a Flex AreaChart. This AreaChart has an AnnotationElement that is an CartesianDataCanvas.
When I draw some items on this CartesianDataCanvas, the chart looks good when the item fits inside the chart.
But when I draw an item that is bigger than the chart, the chart automatically resize and try to fit my it...
Hi there.
I have the following code to track where a user clicks on an image:
<img src="images/test.jpg" id="testimg" />
<script type="text/javascript">
$("#testimg").click(function (ev) {
mouseX = ev.pageX;
mouseY = ev.pageY
alert(mouseX + ' ' + mouseY);
})
</script>
Wha...
There's a decent amount of information out there on the Activity lifecycle. But I'm surprised how difficult it is to find a comprehensive description of the rendering lifecycle. By that I mean the order and rules by which a tree of nested activities, views, and drawables get to be sized and drawn to the screen, and the points at which ...
I have a list of colors in hex format. I then call System.Drawing.ColorTranslator.FromHtml("#ff0000") to get a color object in C# that I then draw on a white background.
I draw many shapes and I'd like to visually be able to tell if they are overlapping using alpha transparency. So if I draw a yellow and a red square that partially ov...
So i have this control, and im overriding it to create a transparent background with this:
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x20;
return cp;
}
}
On the paint method, im doing this:
protect...
I'm a web developer but I usually have difficulties making my apps beautiful. I need to learn how to create good images, icons, backgrounds, logos, etc.
the problem is, I don't know for sure where do I start. I need guidance. can you guys show me a pathway to learn that kind of stuff from zero to expert? what do I have to read? what do ...