transformation

Image shear in WPF

Hello, I am trying to shear an Image in WPF (C#) using pure XAML. I have used transformations such as skew, scale and matrix but I am not getting the result as I want. Following is the code I am using <Image Source="G:\Demo\virtualization\virtualization\img3.bmp" Stretch="Fill" Height="70" Width="240" Margin="0,170,-312,-29" > ...

xsl remove all non-numeric characters and leading 1

I need to convert incoming phone number strings to a standardized format that does not have any non-numeric characters and strips off the leading number if it is 1. For example: "+1 (222) 333-4444 x 5555" becomes "22233344445555" Thanks in advance for your help! ...

Problem with positioning a copy of a QGraphicsPolygonItem in a QGraphicsScene

Hi. I have an application where a QGraphicsPolygonItem (objectA) has the following characteristics: ScenePos: X=250 Y=125 Transform(): |----|---|---| | 2 | 0 | 0 | | 0 | 1 | 0 | | 50 | 0 | 1 | |----|---|---| Now, I am creating and new QGraphicsPolygonItem (objectB) and setting its scenepos and Transform the same as object A: obj...

Translation problem while scaling an object

Hi, I have a QGraphicsPolygonItem defined as: myShape << QPointF(-50, -50) << QPointF(50, -50) << QPointF(50, 50) << QPointF(-50, 50) << QPointF(-50, -50); mypolygon.setPolygon(myShape); Its starting matrix is identity: |---|---|---| | 1 | 0 | 0 | | 0 | 1 | 0 | | 0 | 0 | 1 | |---...

How to transform Source with invalid XML characters

Hi I am working on a case where I need to clean invalid XML characters I receive from a SharePoint web service. I know fixing the source is the right thing to do - however this issue has been reported back in 2008, and I have yet to find that Microsoft has released a patch for it. For now, I call the Web Service using the Provider inte...

Lists in Python

Possible Duplicate: What is the easiest way to convert list with str into list with int? =) Is it possible to transform: a = ['1', '2', '3', '4'] to a = [1, 2, 3, 4] Thank You! ...

How can I retrieve the current transformation in an HTML5 Canvas?

I've got a long sequence of canvas .scale(), .translate(), .save(), and .restore() commands in my code. Is there any way to retrieve some representation of the current transformation, short of logging everything myself, such that I can find out where a screen coordinate maps to a transformed coordinate. Is this possible? ...

Query Atl transformation HOT

how to create a query using an ATL transformation in accordance with the ATL metamodel (to understand a HOT)? thanks ...

XML 2 XML using XSLT

Hi, I learned about XSLT and XPath at w3schools,but it's not exactly what I wanted.. There are only examples about transforming XSLT 2 HTML, this is pretty easy,but I need a XML 2 XML transformation and can't find a good tutorial with examples...I downloaded MSXSL.exe but can't find exempls about using it to transform XML... Can anyone w...

OpenGL Rotation of an object around a line

Hi, I am programming in OpenGL and C++. I know 2 points on 1 line ( a diagonal line) and wish to rotate an object around that diagonal line. How can I go about doing this? I know how to use glrotatef to rotate it around the x, y or z axis but am not sure about this Thanks Jessica ...

OpenGL Transformation Problem

Can someone explain what is happening in the example below: glMatrixMode(GL_MODELVIEW); glPushMatrix(); glLoadIdentity(); glRotatef(45,0,0,1); DrawCube(); glTranslatef(4,0,0); glRotatef(-45,0,0,1); DrawCube(); glPopMatrix(); I am assuming that it will just rotate the square, shift it right 4 units, and then rotate it back to its origi...

html canvas font scaling problem , text is flickering without reason

I readed many forums, but never found some analogue case. Javascript canvas font displays in a flickering fashion. The conditions appears to be: scale of the canvas is not an integer (for example setScale(0.1,0.3)) setTransform(1,0,0,1,0,0); and setScale are used widely to restore setting at every draw of new objects. Windows. In linu...