Search Results

Search found 8498 results on 340 pages for 'integrated graphics'.

Page 87/340 | < Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >

  • how to dynamically recolor a CGGradientRef

    - by saintmac
    I have three CGGradientRef's that I need to be able to dynamically recolor. When I Initialise the CGGradientRef's the first time I get the expected result, but every time I attempt to change the colors nothing happens. Why? gradient is an instance variable ins a subclass of CALayer: @interface GradientLayer : CALayer { CGGradientRef gradient; //other stuff } @end Code: if (gradient != NULL) { CGGradientRelease(gradient); gradient = NULL; } RGBA color[360]; //set up array CGColorSpaceRef rgb = CGColorSpaceCreateDeviceRGB(); gradient = CGGradientCreateWithColorComponents ( rgb, color, NULL, sizeof (color) / sizeof (color[0]) ); CGColorSpaceRelease(rgb); [self setNeedsDisplay];

    Read the article

  • How do I change the Unit:Characters in Matlab?

    - by Jonas
    For portability, I set the units of my GUIs to 'characters'. Now I have a user who wants to use Matlab on his netbook, and the GUI window is larger than the screen (and thus cropped at the top). I think I could try and write something in the openingFcn of the GUI that measures screen size and then adjusts the GUI accordingly, but I'd rather avoid that, because I then need to deal with text that is bigger than the text boxes, etc. What I'd rather like to do is somehow adjust the unit 'character' on his Matlab installation. None of the font sizes in the preferences seem to have an effect on unit:character, though. Does anyone know whether there's a setting for that, which can be changed from within Matlab (I don't mind if it's something that is reset at every reboot, since I can just put it into the startup script)?

    Read the article

  • Best web technology for building dynamic charts

    - by Ryan
    I need to build a custom designed bar chart that displays some simple data. Below are my requirements. Can anyone suggest the best web technology for my requirements. high browser compatibility ability to draw shapes ability to fill shapes with gradients ability to have onclick and onmouseover events for the different shapes (bars in the chart). Thanks guys. I was thinking of using svg but looking for suggestions.

    Read the article

  • Inner shadow issue in Illustrator CS5

    - by Joe Conlin
    I gave a comp to my client that I did in Photoshop. I used an inner shadow but now have realized the in Illustrator CS5 I have no such "easy" filter. I have spent 2 days seaching the web, trying tutorials, etc. to no avail. Every tutorial seems to use text but I am not using text. Anyone that can answer I would forever been in debt... :) This is the image with the inner shadow inside the stripes that I am needing to duplicate. Thanks!

    Read the article

  • How can I draw the control points of a Bézier Path in Java?

    - by Sanoj
    I have created a Path of Bézier curves and it works fine to draw the path. But I don't know How I can draw the Control Points together with the Path. Is that possible or do I have to keep track of them in another datastructure? I am creating the path with: Path2D.Double path = new Path2D.Double(); path.moveTo(0,0); path.curveTo(5, 6, 23, 12, 45, 54); path.curveTo(34, 23, 12, 34, 2, 3); And drawing it with: g2.draw(path);

    Read the article

  • How to draw a filled circle in Java?

    - by Roman
    I have a JPanel with a Grid Layout. In the "cells" of the grid I can put different elements (for example JButtons). There is no problems with that. But now I want to put a filled circle in some of the cells. I also would like to relate an ActionListener with these circles. In more details, if I click the circle it disappears from the current cell and appears in another one. How can I do it in Java? I am using Swing.

    Read the article

  • Is there a way to organize a icon collection to allow for easy searching?

    - by John M
    Is there any way of organizing a icon collection so that it easier to find needed icons? For example: the program needs a save icon there are 5 icons collections on your HD that have a save icon and there are 5 more collections that don't have a save icon (but you don't know that) do you browse through each icon collection? run a search (assumes files are named consistently)? Would it be ideal to have some sort of organized directory (printable?)?

    Read the article

  • Changing direction of rotation Pygame

    - by czl
    How would you change the direction of a rotating image/rect in Pygame? Applying positive and negative degree values works but it seems to only be able to rotate one direction throughout my window. Is there a way to ensure a change in direction of rotation? Perhaps change up rotation of a spinning image every 5 seconds, or if able to change the direction of the spin when hitting a X or Y axis. I've added some code below. It seems like switching movement directions is easy with rect.move_ip as long as I specify a speed and have location clause, it does what I want. Unfortunately rotation is't like that. Here I'l adding angles to make sure it spins, but no matter what I try, I'm unable to negate the rotation. def rotate_image(self): #rotate image orig_rect = self.image.get_rect() rot_image = pygame.transform.rotate(self.image, self.angle) rot_rect = orig_rect.copy() rot_rect.center = rot_image.get_rect().center rot_image = rot_image.subsurface(rot_rect).copy() return rot_image def render(self): self.screen.fill(self.bg_color) self.rect.move_ip(0,5) #Y axis movement at 5 px per frame self.angle += 5 #add 5 anglewhen the rect has not hit one of the window self.angle %= 360 if self.rect.left < 0 or self.rect.right > self.width: self.speed[0] = -self.speed[0] self.angle = -self.angle #tried to invert the angle self.angle -= 5 #trying to negate the angle rotation self.angle %= 360 self.screen.blit(self.rotate_image(),self.rect) pygame.display.flip() I would really like to know how to invert rotation of a image. You may provide your own examples.

    Read the article

  • How to get results efficiently out of an Octree/Quadtree?

    - by Reveazure
    I am working on a piece of 3D software that has sometimes has to perform intersections between massive numbers of curves (sometimes ~100,000). The most natural way to do this is to do an N^2 bounding box check, and then those curves whose bounding boxes overlap get intersected. I heard good things about octrees, so I decided to try implementing one to see if I would get improved performance. Here's my design: Each octree node is implemented as a class with a list of subnodes and an ordered list of object indices. When an object is being added, it's added to the lowest node that entirely contains the object, or some of that node's children if the object doesn't fill all of the children. Now, what I want to do is retrieve all objects that share a tree node with a given object. To do this, I traverse all tree nodes, and if they contain the given index, I add all of their other indices to an ordered list. This is efficient because the indices within each node are already ordered, so finding out if each index is already in the list is fast. However, the list ends up having to be resized, and this takes up most of the time in the algorithm. So what I need is some kind of tree-like data structure that will allow me to efficiently add ordered data, and also be efficient in memory. Any suggestions?

    Read the article

  • Rss feed for game programmer?

    - by simpleblob
    I was browsing this thread, which has good recommendation but a bit too general for me. So, if anyone has a collection of nice game programming feeds,please share them. :) (both general and specific topics are welcome)

    Read the article

  • How can you distribute the color intensity of two images using its gradients?

    - by Jeppy-man
    Hello everyone... I am working on an automatic image stitching algorithm using MATLAB. So far, I have downloaded a source code much like the one that I had in mind and so, I'm currently studying how the code work. The problem is, when stitching two or more images together, their color intensity will most probably be different from each other so the stitched seams will be visible to the eye... So, right now, I'm trying to find out how to redistribute their color intensity using the images gradients so that the whole stitched image will have the same color intensity. I hope someone can help me out there and if so, thank you very much...

    Read the article

  • How to get ImageButton size within Android GridView?

    - by wufoo
    I'm subclassing ImageButton in order to draw lines on it and trying to figure out where the actual button coordinates are within my gridview. I am using onGlobalLayout to setup Top, Bottom, Right and Left, but these seem to be for the actual "square" within the grid, and not the actual button (see image). The purple lines are drawn in myImageButton.onDraw() using coords gathered from myImageButton.onGlobalLayout(). I thought these would be for the button, but they seem to be from something else. Not sure what. I'd like the purple lines to match the outline of the button so the lines I draw appear on the button and not just floating out in the LinearLayout somewhere. The light blue is the background color of the vertical LinearLayout holding the Textview (for the number) and myImageButton. Any way to get the actual button size? XML Layout: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/lay_cellframe" android:layout_width="fill_parent" android:layout_height="fill_parent" > <LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="fill_vertical|fill_horizontal" android:orientation="vertical" > <TextView android:id="@+id/tv_cell" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_margin="2dp" android:gravity="center" android:text="TextView" android:textSize="10sp" /> <com.example.icaltest2.myImageButton android:id="@+id/imageButton1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="center" android:layout_margin="0dp" android:adjustViewBounds="false" android:background="@android:drawable/btn_default" android:scaleType="fitXY" android:src="@android:color/transparent" /> </LinearLayout> </FrameLayout> myImageButton.java public myImageButton (Context context, AttributeSet attrs) { super (context, attrs); mBounds = new Rect(); ViewTreeObserver vto = this.getViewTreeObserver (); vto.addOnGlobalLayoutListener (ogl); Log.d (TAG, "myImageButton"); } ... OnGlobalLayoutListener ogl = new OnGlobalLayoutListener() { @Override public void onGlobalLayout () { Rect b = getDrawable ().getBounds (); mBtnTop = b.centerY () - (b.height () / 2); mBtnBot = b.centerY () + (b.height () / 2); mBtnLeft = b.centerX () - (b.width () / 2); mBtnRight = b.centerX () + (b.width () / 2); } }; ... @Override protected void onDraw (Canvas canvas) { super.onDraw (canvas); Paint p = new Paint (); p.setStyle (Paint.Style.STROKE); p.setStrokeWidth (1); p.setColor (Color.MAGENTA); canvas.drawCircle (mBtnLeft, mBtnTop, 2, p); canvas.drawCircle (mBtnLeft, mBtnBot, 2, p); canvas.drawCircle (mBtnRight, mBtnTop, 2, p); canvas.drawCircle (mBtnRight, mBtnBot, 2, p); canvas.drawRect (mBtnLeft, mBtnTop, mBtnRight, mBtnBot, p); }

    Read the article

  • Drawing animation

    - by HHHH
    I'm creating a simple app where when the user presses a button, a series of lines will be drawn on the screen and the user will be able to see these lines drawn in real time (almost like an animation). My code looks something like this (has been simplified): UIGraphicsBeginImageContext(CGSizeMake(300,300)); CGContextRef context = UIGraphicsGetCurrentContext(); for (int i = 0; i < 100; i++ ) { CGContextMoveToPoint(context, i, i); CGContextAddLineToPoint(context, i+20, i+20); CGContextSetStrokeColorWithColor(context, [[UIColor blackColor] CGColor]); CGContextStrokePath(context); } UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); My problem is that: 1) As soon as the user presses the button, the UIThread blocks until the drawing is done. 2) I can't get the lines to be drawn on the screen one at a time - I've tried setting the UIImage directly inside the loop and also tried setting a layer content inside the loop. How do I get around these problems?

    Read the article

  • Paint app for iPhone

    - by Comma
    I would like to develop a MS paint like app for the iPhone. Could you guys point me to some sample or tutorials on this topic? I'm new to Objective C and Xcode. Thanks

    Read the article

  • Secure Desktop Mode effect for java application

    - by Aiden Strydom
    Does anyone now how to achieve a "Secure-Desktop Mode" (effect) such as one gets from the Windows Vista/7 UAC consent-blocks? I assume it is some function which will remove pixels here-and-there (and possibly graying them) and then finally drawing that to screen... I would like to apply it to my application to keep the user from doing anything until the another user connects to the system (but that is besides the point) I would really appreciate the advise. Kind regards A EDIT: i was really only looking for this graphicsFX.setColor(new Color(0, 0, 0, 0.8f)); graphicsFX.fillRect(0, 0, 800, 600); the defering of input i can do quite well... Thanks for all....

    Read the article

  • changing the intensity of lighten/darken on bitmaps using PorterDuffXfermode in the Android Paint class

    - by user1116836
    Ok my orignal question has changed. How do i change the intensity of how something like this is effected? DayToNight.setXfermode(new PorterDuffXfermode(Mode.DST_IN)); in my dream world it would have worked like this DayToNight.setXfermode(new PorterDuffXfermode(Mode.DST_IN(10))); the 10 being a level of intensity. An example would be if I had a flickering candle, when the candle burns bright I want the bitmaps I am drawing to the screen to retain their origanol color and brightness, when it flickers I want the bitmaps to be almost blacked out, and I want to darken the Bitmaps as the light dims. I have equations, timers and all that figured out, just not how to actually apply it to change the color/brightness. Maybe burning the images is what im looking for? I just want to change the lightness lol. I feel like using paint.setShader might be a solution, but the information in this area is pretty limited from what i have been able to find. Any help would be appreciated. edit: to be crystal clear, i am looking for a way to lighten/darken bitmaps as I draw them to the canvas

    Read the article

  • How do I create a "jumping" circle in Java GUI?

    - by Roman
    I would like to have a red filled circle at some place in my window. After the click on the circle, the circle should jump from the original place to a new one (disappear from the old place and appear on the new one). What would be the best way to do it? I also would like to know how to draw a filled circle in Java. Are there any simple tools to do it? Or may be the easiest way is to use an image created by some other software?

    Read the article

  • draw a curve Sketchup using ruby

    - by David
    Below are some point 3d 15.733798,20.019757,23.006311 15.733798,19.847666,23.006311 15.723798,19.847666,23.006311 15.723798,20.019757,23.006311 15.733798,20.019757,23.006311 and this is a vector 0.0,0.0,-0.1 Is it possible to draw a curve from the information above in sketchup? Thank you

    Read the article

  • Android SurfaceView/Canvas flickering after trying to clear it

    - by Mark D
    So I am trying to clear the Canvas using canvas.drawColor(Color.BLACK) but if I just call this once, the display flickers and displays the old drawing which should have been covered up by the drawColor. Here is the important bits of my code - public void update() { //This method is called by a Thread Canvas canvas = holder.lockCanvas(null); if (canvas != null) { onDraw(canvas); } holder.unlockCanvasAndPost(canvas); } @Override protected void onDraw(Canvas canvas) { if (toClear) { canvas.drawColor(Color.BLACK); //if this is not set to change back to false, it does not flicker toClear = false; } //Draw some objects that are moving around } public void clearScreen() { //This method is called when the user pressed a button toClear = true; } After Googling around a litte, I heard about double buffering but came to the understanding that lockCanvas() and unlockCanvasAndPost() should handle this for me. What is going wrong here?

    Read the article

  • java/swing: font size selection + rendering

    - by Jason S
    I want to create and fill/stroke a path that consists of an outer boundary which is a square of side d and an inner boundary that is the outline of any of the capital letters. How can I do this? (challenges = creating a mask from a font, and figuring out the right size/position to use)

    Read the article

  • OFF descriptions

    - by Myx
    Hi: I'd like to make a scene that uses meshes and primitives (such as spheres, cylinders, boxes, etc). I was wondering if there are any recommendations with regard to where I can go to find .off files that describes complex meshes, such as mountains, rocks, trees, animals, etc. Thanks.

    Read the article

< Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >