transform

WPF Adorner Transforms

Hi, I am building a control, where the user can "draw" resizable rectangles that are laid over the content. To resize those rectangles, I use an Adorner on top of them which contains 4 Thumbs to change the size of the rectangle. The problem is, that this control is is "zoomable", meaning a ScaleTransform is applied to the whole control...

(iphone sdk) When I use CGAffineTransform (such as CGAffineTransformMakeTranslation) does that actually "move" the frame?

Or does it just change where it's rendered? I have performed this transform and I think the object's frame's origin's y position stays the same. ...

Java: How to Indent XML Generated by Transformer

I'm using Java's built in XML transformer to take a DOM document and print out the resulting XML. The problem is that it isn't indenting the text at all despite having set the parameter "indent" explicitly. sample code public class TestXML { public static void main(String args[]) throws Exception { ByteArrayOutputStream s; Docum...

Java: XML Transform, line break in Text node, breaks indenting

I'm building an XML document and printing out into an indented format using the JVM build-in libraries. When there is a text node in the document that contains a line break, it wraps the line to the start of the line instead of it's proper indented position sample code ByteArrayOutputStream s; s = new ByteArrayOutputStream(); Documen...

How to find the transformed point3d coordinates of a transformed ModelVisual3D

I want to click on a model in a Viewport3D and find the 3D coordinates of a model. I want the transformed coordinates. Suppose you have this in a Viewport3D: <ModelVisual3D x:Name="yellowTriangle"> <ModelVisual3D.Content> <GeometryModel3D> <GeometryModel3D.Geometry> <MeshGeometry3D Positions="-1,0,0 0,1,0 1,0,0" TriangleIndic...

How to have Width and Height reflect ScaleTransform and how to ScaleTransform by setting Height and Width?

I have an issue with regards to using a ScaleTransform on a Canvas in Silverlight, the Canvas scales correctly, however the Height and Width values always remain the same. e.g. a 100x100 Canvas scaled so it appears 200x200 is still 100x100 with regards to the Height and Width values, how can these be updated to reflect the new size. A...

Java XML Transformer, "HTML" method adding <META> tag, do not want

I'm using the built-in Java XML Transformer to serialize an XML document into text. I'm having a problem however when I am outputting in HTML mode. Whenever I insert a head element the built-in transformer decides to insert a META tag with content-type data. I don't want this tag inside my data and I can't seem to find an output paramet...

Coordinate Transformation C++

Hello, I have a webcam pointed at a table at a slant and with it I track markers. I have a transformationMatrix in OpenSceneGraph and its translation part contains the relative coordinates from the tracked Object to the Camera. Because the Camera is pointed at a slant, when I move the marker across the table the Y and Z axis is updated, ...

Transform source file to different format for target system

Hi, I need to design a system which will process hundreds of source files (different format fixed width and delimited files) and convert to one target files. There should be two interfaces one is command line other web user interface? Command line interface to run the transform job though batch and web user interface to define the fo...

xslt to operate on element value before displaying?

The default behavior of the xsl on the right-hand side of http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&amp;xsltfile=cdcatalog is to display a 2-column table with the title and artist of each CD in the XML on the left-hand side. (This is shown by the default output under "Your Result" at the bottom.) I want to modify the ...

C++ std::transform() and toupper() ..why does this fail?

Hi, I have 2 std::string. I just want to, given the input string: capitalize every letter assign the capitalized letter to the output string. How come this works: std::string s="hello"; std::string out; std::transform(s.begin(), s.end(), std::back_inserter(out), std::toupper); but this doesn't (results in a program crash)?...

How to apply a Msi transform at uninstall?

I'm trying to fix a Windows Installer based setup that is already released. The fix is for an error that occurs when uninstalling the package. For this I'd like to provide a .mst transform file that is applied before uninstalling. Is it possible to use a transform after the product was installed? Or can the transform be applied to an alr...

Scalable painting of a Qt application

I'm writing a simulation of an embedded device's screen (which contains custom widgets on top of a main QWidget), and while the native size of the screen is 800x600, I want to be able to scale it up and down by dragging the window's corner. Without diddling with grid layouts and stretchers (which won't scale the fonts up/down), how do I ...

Get just the rotation from a CGAffineTransform

Hi, Is it possible to get just the angle of rotation from a CGAffineTransform that also has translation and scaling values? If yes, how? Thanks in advance! ...

Mouse click detection and Transformation2D in Direct3D

I use Sprites to draw images in a D3D window. I draw an image on every sprite within a rectangle (0, 0, width, height) and use Matrix.Transformation2D to place the image in the rendered view. Example: using (Sprite s = new Sprite(device)) { s.Begin(SpriteFlags.AlphaBlend); Matrix tranz = new Matrix(); tranz = ...

Using IE DX Transforms in gridview rows

I am trying to apply a DirectX gradient filter transform to the selected row in an ASP.net page gridview. In the RowDataBound() event I am applying the approprate style (whihc I know works in other situation), and the added row attributes for 'onmouseover' and 'onmouseout' to enable and disable the filter array element(s) so when the mo...

XSLT - how to parse xml with recursive elements to Eclipse toc.xml?

Hi, I have the following XML: <HTML> <HEAD> <META name="GENERATOR" content="Microsoft HTML Help Workshop 4.1" /> <!-- Sitemap 1.0 --> </HEAD> <BODY> <OBJECT type="text/site properties"> <param name="FrameName" value="contents" /> </OBJECT> <UL> <LI> <OBJECT type="text/sitemap"> <pa...

How the transformation is possible ?

int[] numbers = { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 }; string[] strings = { "zero", "one", "two", "three", "four", "five", "six", "seven","eight", "nine" }; var textNums = from n in numbers select strings[n]; Console.WriteLine("Number strings:"); foreach (var s in textNums) { ...

moving objects around a circle in Opengl

I am trying to translate an OpenGl object around in a helical pattern. I cannot figure this out. Problem is I know I need to increment the angle for the x, y, and z coordinates, but the translate function that I use only moves the object by a translate amount which is specific to the object. The Axis I am using is Y up, Z toward the scre...

T-SQL: How can I split comma seperated values from a column to rows?

Hi everbody, I have the following table (the number of the references is variable): Id | FK_ID| Reference | ----------------------- 1 2100 GI2, GI32 2 2344 GI56 And I need the following result: Id | FK_ID| Reference | ----------------------- 1 2100 GI2 2 2100 GI32 3 2344 GI56 Is there any short way to tr...