Draw on GdkPixbuf without cairo in python gtk 3? - pygtk

How do I draw on a GdkPixbuf object without using cairo? There are quite a few samples in gtk 2 that do this by obtaining a Pixmap and draw on it. However, I can seem to find any function that return a Pixmap in gtk 3. For example render_pixmap_and_mask() is no longer available for a Pixbuf object. How do I obtain a pixmap or any drawable from a GdkPixbuf in gtk 3 (similar to gdk_cairo_set_source_pixbuf)?

Related

How to draw using Vulkan on gtk4 widget?

Is there an example of how to run vulkan commands on a gtk4 widget?
There are some explanations that it can be done by using Gtk OpenGL widget and then to draw on GL Texture. However, I am not sure how to do it.

Blender .fbx -> Spark AR Studio scaling issue for skeleton animations

I'm trying to create a character with skeleton animation in Blender to bring into Spark AR Studio. In Spark I want to use the baked animation. The .fbx brings the model and skeleton into Spark's scene just fine, until a new animation controller is selected via the object's inspector window and the animation is selected for use.
At that point, the Empty object named "Armature" is scaled to 100 instead of 1 and cannot be changed.
As a workaround, the Skeleton child object named "skeleton" can be scaled to 0.01. In Blender, I tried changing the scene's units and made sure the object's scales were all applied. Nothing is scaled to 100, everything is scaled to 1.
Since the object from the .fbx imports into Spark with correct scaling, I expect the animation to maintain that, but once the animation is selected the scale jumps from 1 to 100.
Put you animated object inside some nullObject and then scale down not animated but nullObject. Hope it is clear.

Adobe Animate CC Canvas (CreateJS) vector graphics becomes blurry on scale up

So I am new to this next-gen Flash application they call "Adobe Animate CC" and I am trying to create an interactive map scene... very basic. If you click on the USA it should zoom in. Click again it should zoom out.
The issue I am having is that even though my map was imported from an SVG file -- and from what I can tell when residing in the "Adobe Animate CC" workspace it retains its vector data -- when I apply the scale tween using CreateJS the edges of the graphic become very pixelated.
Here's the code I am using:
var _this = this;
_this.stop();
_this.america.addEventListener("click", zoomMap);
function zoomMap(event) {
createjs.Tween.get(exportRoot.world1).to({scaleX: 10, scaleY: 10, x: 4000, y: 1000}, 1000);
}
And here are some images of the pixelated result:
Even more disconcerting is that that blue-green circle is a native circle object inside a symbol. Not an svg. I would expect that at least that would stay crisp under transformation.
Is this unavoidable? Is the application caching bitmap versions of my vector files on export? Can I stop this? Can I force a re-render of the vector file during and after my tween? Is there any way around this? Does this application even really support vector graphics?
Animate might be exporting as images, but it shouldn't unless you tell it to. What does your library JavaScript look like? Are any images exported? Maybe search the source for .cache to see if Adobe is doing anything funny under the hood.
If the map is an SVG source: Unfortunately, only the only SVG support in EaselJS (which underlays the Animate export) is for svg as a "bitmap source". This means it is being treated as an image of a specific dimensions, and scaling it past "100%" will interpolate the details.
It might be possible to load it as a larger bitmap, and scale it down to start, but that will:
make it much larger in memory
still only let you scale so much
Another option is to import the SVG asset into Adobe Animate, which should convert it to a vector graphic. If it is vector in EaselJS, you can scale it as much as you want, because it uses Canvas vector APIs to draw, instead of an image source.
You mentioned that the green circle is native (I assume a shape in Animate?). Are you sure its not being exported as an image, instead of a shape? Are you caching anything?
Hope that helps!

Kivy Blender Animation

I've got a blended ocean that I want to animate in a Kivy program. Are there other methods of producing the animation aside from getting a bunch of frames and then making a sequential image out of the frame?
You probably need to just create an image animation sequence - either a series of PNGs or an animated GIF - and if the sequence is static, this is generally the best option anyway. However, you could look at tshirtman's ddd garden module, which handles 3d rendering in Kivy, and see if it does what you need.

OpenGL ES Sphere alpha texture exported from Blender

I am using OpenGL ES 1.1 in iOS 5.0 , and I want to draw a sphere with a texture mapped.
The texture will be a map of the world, which is a .png with an alpha channel.
I want that to see the other part of the globe by the inside.
However, I obtain this strange effect and I don't know why this is happening.
I'm exporting from Blender using this script: https://github.com/jlamarche/iOS-OpenGLES-Stuff/tree/master/Blender%20Export/objc_blend_2.62
I've already tried to reverse the orientation of the normals but it didn't help.
I don't want to activate culling because I want to see both faces.
http://imageshack.us/photo/my-images/819/screenshot20121207at308.png/