473,782 Members | 2,436 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to draw an ellipse with an rotated angle?

Hello, there,

I have no idea how to draw an ellipse with an rotated
angle. For example, the ellipse's center is (20.0, 50.0),
two conjugate diameter pairs end-point are (35.0, 35.0),
(25.0, 55.0). I hope to use win32 API functions to finish
this drawing. Is it possible?

Please help me giving your suggestion. Tks.
Nov 20 '05 #1
4 9638
Graphics.Rotate Transform Method
"Shalley" <xl***@towson.e du> wrote in message
news:2d******** *************** *****@phx.gbl.. .
Hello, there,

I have no idea how to draw an ellipse with an rotated
angle. For example, the ellipse's center is (20.0, 50.0),
two conjugate diameter pairs end-point are (35.0, 35.0),
(25.0, 55.0). I hope to use win32 API functions to finish
this drawing. Is it possible?

Please help me giving your suggestion. Tks.

Nov 20 '05 #2
Shalley,
In addition to One Handed Man's comment about Graphics.Rotate Transform, you
may need to take into account Graphics.ScaleT ransform &
Graphics.Transl ateTransform (TranslateTrans form more so than
ScaleTransform) .

RotateTransform will rotate about the current origin, TranslateTransf orm
moves the current origin.

I find Charles Petzold's book "Programmin g Microsoft Windows with Microsoft
Visual Basic .NET" from MS Press to be very helpful in unraveling the
subtleties of GDI+.

Just remember order of operations is important while doing transforms in
GDI+.

Hope this helps
Jay

"Shalley" <xl***@towson.e du> wrote in message
news:2d******** *************** *****@phx.gbl.. .
Hello, there,

I have no idea how to draw an ellipse with an rotated
angle. For example, the ellipse's center is (20.0, 50.0),
two conjugate diameter pairs end-point are (35.0, 35.0),
(25.0, 55.0). I hope to use win32 API functions to finish
this drawing. Is it possible?

Please help me giving your suggestion. Tks.

Nov 20 '05 #3
Hello,

"Jay B. Harlow [MVP - Outlook]" <Ja********@ema il.msn.com> schrieb:
Just remember order of operations is important while doing
transforms in GDI+.


That depends on the type of the operations.

;-)

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #4
Herfried,
That depends on the type of the operations. And if you use the MatrixOrder parameter & which MatrixOrder option. ;-)

Later
Jay

"Herfried K. Wagner [MVP]" <hi*******@m.ac tivevb.de> wrote in message
news:up******** *****@tk2msftng p13.phx.gbl... Hello,

"Jay B. Harlow [MVP - Outlook]" <Ja********@ema il.msn.com> schrieb:
Just remember order of operations is important while doing
transforms in GDI+.


That depends on the type of the operations.

;-)

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet

Nov 20 '05 #5

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

Similar topics

6
8510
by: rzed | last post by:
I'm using PIL to generate some images which may be rotated at the user's option. When they are rotated, the original image is cropped in the new image (which is fine), and the corners are black (which is not, in this case). I can't find any documented way to change the default fill color (if that's what it is) for the corners, and PIL also doesn't seem to support a flood fill. I have created a flood fill in Python, which works but which...
3
9749
by: faustino Dina | last post by:
Hi, I was looking on the SDK but I can't find how to draw text in angles different from 0 and 90. Is it possible? If not, does exist some 3rd party library allowing this? Any hint is welcomed Thanks in advance Faustino
1
4751
by: Nanda | last post by:
hi, try this, bmp=new Bitmap(Width,Height); g=Graphics.FromImage(bmp); g.DrawEllipse(Pens.Red, new Rectangle(0, 0, 100, 100)); g.Save(); bmp.Save(filename,System.Drawing.Imaging.ImageFormat.Gif); HTH,
1
4349
by: zxo102 | last post by:
Hi everyone, I have tried two days to figure out how to draw the image in wx.BufferedDC on the page created by AddPage of wx.Notebook but still got no clue. The attached example works fine. If I click the menu "Draw" --"New Drawing". The image with wx.BufferedDC/wx.BufferedPaintDC can move around on the frame. But If I uncomment those three commented lines in "class TestFrame" to add a new page (from wx.Notebook) with a tag and modify...
5
9243
by: lgeastwood | last post by:
I have tweaked the PictureBox97.mdb (Stephen Lebans <www.lebans.com>) code to nicely draw lines, rectangles and circles to the specs that I input. I'm at a loss though with trying to setup an Ellipse Drawing Function. The following code I found on Google works in VB5 and draws an ellipse shape no problem using the Circle Method. Private Sub cmdDrawEllipse_Click() Dim X As Long, Y As Long Dim ElipseWidth As Integer, ElipseHeight As...
2
1506
by: Smokey Grindel | last post by:
I want to draw a string that is at a 90 degree angle instead of left to right it would be rotated 90 degrees... how would you go about doing this? thanks!
11
8732
by: Christopher Ireland | last post by:
Hello! Using the definition for en ellipse (http://en.wikipedia.org/wiki/Ellipse) I can draw an arc of points. However, the end points of this arc do not coincide with the end points of an arc drawn with the DrawArc method, e.g. public partial class Form2 : Form { public Form2() {
2
12666
by: weird0 | last post by:
I wanted to draw an ellipse using c# with System.Drawing.Graphics. I tried out several tutorials and none of them worked and there seems to be something missing. One did execute without any errors but it did not render an ellipse on the form. I want to create an ellipse with just a new project with one form default, that is Form1. I want the draw ellipse function to be in some other class,say Shapes( user-defined) and then call it in the...
4
3975
by: Slickuser | last post by:
I am trying to draw an ellipse with specify x,y,width, and height for input argument in C# .net (Visual Studio 2005). It seem it will not draw for me. What am I missing? See the code below, thanks. //CODE
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10313
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10146
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10080
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6735
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3643
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2875
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.