473,386 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

GDI+ transformations

Hi all,

I expected the following 2 pieces of code to give the same result, but they
don't
Can anybody explain me why?

Dim wissel As Graphics
Dim Matrix As New Matrix
wissel = pe.Graphics
Matrix.Scale(-1,1)
Matrix.Translate(90,0,Matrixorder.Append)
Wissel.Transform = Matrix
MyBase.OnPaint(pe)
Dim wissel As Graphics
wissel = pe.Graphics
wissel.ScaleTransform(-1,1)
Wissel.TranslateTransform = (90,0,MatrixOrder.Append)
MyBase.OnPaint(pe)
Thanks in advance

Jan Warning
Nov 21 '05 #1
1 1227
http://www.vbdotnetheaven.com/Sections/GDI+.asp

Jan Warning wrote:
Hi all,

I expected the following 2 pieces of code to give the same result, but they
don't
Can anybody explain me why?

Dim wissel As Graphics
Dim Matrix As New Matrix
wissel = pe.Graphics
Matrix.Scale(-1,1)
Matrix.Translate(90,0,Matrixorder.Append)
Wissel.Transform = Matrix
MyBase.OnPaint(pe)
Dim wissel As Graphics
wissel = pe.Graphics
wissel.ScaleTransform(-1,1)
Wissel.TranslateTransform = (90,0,MatrixOrder.Append)
MyBase.OnPaint(pe)
Thanks in advance

Jan Warning

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Charles Law | last post by:
If I draw a rectangle, 6 inches by 2 inches, on a user control with a PageUnit of Inches, I get a rectangle of 7 by 2.2 inches. Is this what people would expect? I would have hoped that it was at...
3
by: Tommy Lang | last post by:
Hi, I need some help. I am trying to draw cards. I am using DrawRectagle() to draw upp the outlining of the card. Then I fill the card with white color FillRectangle(). Then with DrawString I can...
6
by: Christopher | last post by:
I am currently in the process of evaluating the performance hits of moving to the .NET platform for our application. I created a sample project that loads the transforms the same XML and XSLT in...
6
by: James dean | last post by:
I have heard that the video drivers in GDI+ are a big performance issue. But is this only an issue with something like Games Programming i think...is this wrong?. What about a drawing application...
1
by: James dean | last post by:
Could someone explain how this works. I think the graphics card is used to do blitting and drawing shapes like rectangles. How does it draw using the Graphics card on the PC and why is this feature...
7
by: | last post by:
We create VC++ programs that does some GDI drawing functionality. I discovered GDI+ and this seems to be a big step forward, and appears to be standard available in Windows XP and Windows Server...
2
by: ZQ | last post by:
Hi everyone! I have a question about GDI+. float deltaY = 0; // the onPaint handler of my control protected override void OnPaint(PaintEventArgs e) { e.Graphics.TranslateTransform(0,...
3
by: Fabio | last post by:
Hi all! A question about transformations. Let's have this piece of code that transforms the coordinates of the Graphics object: --------- Graphics g = e.Graphics; Matrix m = g.Transform;
14
by: James Wong | last post by:
Hi everybody, I'm facing a serious trouble relating to GDI+ generic error. The error message is "A Generic error occured in GDI+" and the following information is stored in Excepton object:...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.