transform

Auto scale and rotate images

Given: two images of the same subject matter; the images have the same resolution, colour depth, and file format; the images differ in size and rotation; and two lists of (x, y) co-ordinates that correlate the images. I would like to know: How do you transform the larger image so that it visually aligns to the second image? (Option...

Parent-Child Constraints

Example: var circle1 :Canvas = new Canvas(); var circle2 :Canvas = new Canvas(); circle1.addChild( circle2 ) circle1.scaleX = 2; After the example before when Flash will render circle2 because it is child to circle1 it will be scaled to. Is there a way I can scale circle1 without affect circle2 or what can I do to circle2 so it can h...

SSIS SELECT VALUE from a table without a lookup

I'm fairly new to SSIS, I'm importing from an XLS spreadsheet into a database table. Along the way I want to select a record from a table, but it is NOT a lookup, ie: a straight SELECT with no join from input source. Then I want to merge this along with the other rows from the XLS. What is the best way to do this? Variables? OLE DB...

Need some help with a SQL query (SQL Server 2005) to transform this data

Here's a simplistic look at the table I have Category CategoryId CategoryName ParentCategoryId As you can see, the catalog table is a self referencing table, so recursing it is possible by starting at 0, which is the fake "root" category (could just as well be null, but it's not). Sample Data: 1, Apples, 0 5, Yummy, 1 10, Really Y...

Map XML data from different XML Schema

Hi, We've an XML contains data. We need to extract data from it and move it in to a different XML. Both XMLs are different in structure. We have Altova and we want to do this job by using it. Any solution on this; which Altova tool will be best for this job and how? Thanks. ...

WPF: Can I get the size of a UIElement AFTER a transform is applied?

In WPF/Silverlight, can I get the calculated value of a UIElement after a transformation is applied? (Per the comment below): I've got a stack panel and I've applied a TranformGroup to it. There are two translate and one scale transforms in this group. (warning, psuedo code ahead) groupTransform.children.add(new TranslateTransform())...

Decompose complex matrix transformation into a series of simple transformations?

I wonder if it is possible (and if it is then how) to re-present an arbitrary M3 matrix transformation as a sequence of simpler transformations (such as translate, scale, skew, rotate) In other words: how to calculate MTranslate, MScale, MRotate, MSkew matrices from the MComplex so that the following equation would be true: MComplex = ...

Can custom transforms be used (in theory) to create a water ripple effect on a CALayer?

It's possible to create custom transform matrices. But I wonder if they are suited for making water ripple effects on a CALAyer. Think of 20 of them in an animation. Can someone tell? ...

Are there any tutorials out there on creating custom transform matrices for iPhone OS?

I want to jump in that stuff. Some good tutorials would be cool! ...

How can I alter the values of an transform?

For example, I can access them like this: self.layer.transform.m32 but I can't assign a value to it, like self.layer.transform.m32 = 0.3f; it says invalid assignment. But shouldn't that actually work? struct CATransform3D { CGFloat m11, m12, m13, m14; CGFloat m21, m22, m23, m24; CGFloat m31, m32, m33, m34; CGFloat m...

WPF animation of multiple 3D objects doing multiple transforms each

I'm working on a WPF 3D project where I can have multiple (1 - 20'ish) ModelVisual3D objects being moved around the scene via animation. Each ModelVisual3D has both a RotateTransform3D and a TranslateTransform3D applied to it each move. And each ModelVisual3D object moves independently of each other. So right now in order to do this, ...

Java+DOM: How do I elegantly rename an xmlns:xyz attribute?

Hello! I have something like that as input: <root xmlns="urn:my:main" xmlns:a="urn:my:a" xmlns:b="urn:my:b"> ... </root> And want to have something like that as output: <MY_main:root xmlns:MY_main="urn:my:main" xmlns:MY_a="urn:my:a" xmlns:MY_b="urn:my:b"> ... </MY_main:root> ... or the other way round. How do ...

Ruby symbol to class

Is there a way in Ruby to take a symbol or string and turn it into a class of the same name? For instance, if I have a class such as class Bob def talk puts "Hi, I'm bob" end end And a method I have somewhere else in the code is passed a symbol :bob, can I in some way turn that into the class Bob? Maybe something like b = ...

CGAffineTransform on NSObjects?

Does CGAffineTransform only work on UIViews? This is troublesome for my design. The objects that im drawing are essentially images, which i draw using drawAtPoint. These objects are NSObjects, and thus do not have transformation matrices. What would be the best way to give my rendered images the ability to be scaled and translated (and...

Where can I find an explanation of all transform matrix fields?

I've seen in some document from apple that the matrix behind a CALayer's transform property has fields like m14, m21, m22 and so on. I also remember that I saw a table that explains those fields, about one or two months ago. I had a hard time trying to find it. Anybody knows a source? ...

What happens to the view.frame.size attribute after a CGAffineTransform (Rotate)?

I have a UIImageView that can be resized by pinching in and out (Example: view.frame.size.width+10). The image of the Image View can also be rotated (CGAffineTransformMakeRotate). Okay, here is the problem: When I resize the UIImageView AFTER having had applied a Rotate Transform the view resizes abnormally (inversly (shrink when it shou...

Vertical TextBlock filling verical space

I want to create a TextBlock (or some other element with text in it for display only) that is vertical (-90 transform angle), but I want that element to fill up the vertical space it is contained in, but have a defined horizontal amount (I'm using vertical and horizontal terms instead of height and width since it's swapped when I have th...

problems using STL std::transform from cygwin g++

I am running g++(gcc version 3.4.4) on cygwin. I can't get this small snippet of code to compile. I included the appropriate headers. int main(){ std::string temp("asgfsgfafgwwffw"); std::transform(temp.begin(), temp.end(), temp.begin(), std::toupper); std::cout <<...

Find names of all classes that a Java program loads using reflection

To support a static-analysis tool I want to instrument or monitor a Java program in such a way that I can determine for every reflective call (like Method.invoke(..)): 1.) which class C this method is invoked on, and 2.) which classloader loaded this class C. Ideally I am looking for a solution that does not require me to statically m...

mapping from normalized device coordinates to view space

Hey there! I'd like to map from normalized device coordinates back to viewspace. The other way arround works like this: viewspace -> clip space : multiply the homogeneous coordinates by the projection matrix clip space -> normalized device coordinates: divide the (x,y,z,w) by w now in normalized device coordinates all coordinates wh...