c# - How to flip a string? -


how can flip string in c# application example : "ambulance" text seen mirror image.i dont have idea start .im using c# forms application

i have tried reversing string ,but there possibility flip string (like mirror images)?

like : ƎƆИa⅃uᙠma

this not reversing in so post

as approach outlined sergey, can use graphics.scaletransform() reflect y-axis.

for example, create default windows forms application , drop following onpaint() it, run it:

protected override void onpaint(painteventargs e) {     base.onpaint(e);      string text = "this come out backwards";      e.graphics.scaletransform(-1, 1);     float w = e.graphics.measurestring(text, this.font).width;     e.graphics.drawstring(text, this.font, brushes.black, -w, 0); } 

output:

the text reflected y

you can mess around graphics.rotatetransform() rotate text well, , use graphics.scaletransform(1, -1) invert mirror it:

enter image description here


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -