Click here to Skip to main content
15,895,815 members
Home / Discussions / C#
   

C#

 
GeneralRe: searching an XML file Pin
Spacix One28-Aug-07 14:04
Spacix One28-Aug-07 14:04 
GeneralRe: searching an XML file Pin
Christian Graus28-Aug-07 16:12
protectorChristian Graus28-Aug-07 16:12 
GeneralRe: searching an XML file Pin
Spacix One29-Aug-07 5:13
Spacix One29-Aug-07 5:13 
GeneralRe: searching an XML file Pin
jacobparker30-Aug-07 4:54
jacobparker30-Aug-07 4:54 
GeneralRe: searching an XML file Pin
Spacix One30-Aug-07 5:10
Spacix One30-Aug-07 5:10 
Questionform control text value & XML Pin
Blubbo28-Aug-07 9:30
Blubbo28-Aug-07 9:30 
QuestionScaling a Polygon Pin
Joshua Lunsford28-Aug-07 9:26
Joshua Lunsford28-Aug-07 9:26 
AnswerRe: Scaling a Polygon Pin
Hessam Jalali28-Aug-07 21:56
Hessam Jalali28-Aug-07 21:56 
I don't know this would be useful or not (and I think you already know this!)but this is all it's math

it can be done using rectangle technique and i'm think is fast enough for normal size shapes

you can assume all your shapes you are going to resize are in a rectangle (x1,y1),(x2,y2) which the first one is top left and the second is bottom right

so for resizing the shape you can resize the rectangle and map the changes to your shape

the easiest way is to get one point as a reference inside the rectangle for fixing the shape

the rectangle would be used for calculating the ratio if you get the ratio directly you wouldn't need the ectangle points

for example I suppose that I have a polygon with (10,10),(21,21),(15,40) and I want to resize it to 2X (the ratio)

I assume my reference point to (10,10)

my new resized polygon without fixing to its position is (20,20),(42,42),(30,80)

my referene point is (20,20) in new polygon so it has linear transform (10,10) from the actual reference so I must subtract it and my refDiff would be (10,10)

the resized fixed position polygon would be (10,10),(32,32),(20,70)

but if you dont have the ratio you must find ir from the rectangle which "x1 is Min of all x"
"x2 is Max of all x" "y1 is Min of all y" and "y2 is Max of all y"

you cn find the ratio from changing the first ractangle Width and Height from the second one and use the ratio as before

so the formula foreach point would be

Xn=ratioAtx*xn-refxDiff
Yn=ratioAty*yn-refyDiff

I think this is the easiest way to do that in math and implementing it is depend on yourself (sorry if you didn't mean this)

hope this would be useful
GeneralRe: Scaling a Polygon Pin
Joshua Lunsford4-Sep-07 10:01
Joshua Lunsford4-Sep-07 10:01 
GeneralRe: Scaling a Polygon Pin
Lewis Liu L8-Sep-09 13:56
Lewis Liu L8-Sep-09 13:56 
QuestionCheck MICR Pin
Saamir28-Aug-07 8:19
Saamir28-Aug-07 8:19 
Questionwhich is more faster Embedded Control or External Pin
I Believe In GOD28-Aug-07 7:14
I Believe In GOD28-Aug-07 7:14 
AnswerRe: which is more faster Embedded Control or External Pin
Scott Dorman28-Aug-07 7:20
professionalScott Dorman28-Aug-07 7:20 
GeneralRe: which is more faster Embedded Control or External Pin
I Believe In GOD28-Aug-07 7:42
I Believe In GOD28-Aug-07 7:42 
AnswerRe: which is more faster Embedded Control or External Pin
led mike28-Aug-07 7:22
led mike28-Aug-07 7:22 
GeneralRe: which is more faster Embedded Control or External Pin
I Believe In GOD28-Aug-07 7:45
I Believe In GOD28-Aug-07 7:45 
AnswerRe: which is more faster Embedded Control or External Pin
Daniel Turini28-Aug-07 10:51
Daniel Turini28-Aug-07 10:51 
QuestionConverting numbers Pin
Le centriste28-Aug-07 6:48
Le centriste28-Aug-07 6:48 
AnswerRe: Converting numbers Pin
Scott Dorman28-Aug-07 7:02
professionalScott Dorman28-Aug-07 7:02 
GeneralRe: Converting numbers Pin
Le centriste28-Aug-07 7:04
Le centriste28-Aug-07 7:04 
GeneralRe: Converting numbers Pin
Scott Dorman28-Aug-07 7:10
professionalScott Dorman28-Aug-07 7:10 
GeneralRe: Converting numbers Pin
Le centriste28-Aug-07 7:14
Le centriste28-Aug-07 7:14 
GeneralRe: Converting numbers Pin
Scott Dorman28-Aug-07 7:23
professionalScott Dorman28-Aug-07 7:23 
GeneralRe: Converting numbers Pin
DavidNohejl29-Aug-07 1:01
DavidNohejl29-Aug-07 1:01 
QuestionIcons in ListBox Pin
spotl28-Aug-07 6:46
spotl28-Aug-07 6:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.