Jump to content

Rotate a label


James
 Share

Recommended Posts

Anyone going to say boo too a goose? BUMP

Geese are scary things!

I have no idea how to do it in AutoIt. In case it is any help, this is how I do it in Delphi using a method I found somewhere.

procedure AngleTextOut(CV: TCanvas; const sText: String; x,y, angle,size:integer);
var
   LogFont: TLogFont;
   SaveFont: TFont;
begin
  SetGraphicsMode(CV.Handle, GM_ADVANCED);//for NT
  CV.Font.Size:=size;
//  CV.Font.Color:=Col;
  SaveFont := TFont.Create;
  SaveFont.Assign(CV.Font);
  GetObject(SaveFont.Handle, sizeof(TLogFont), @LogFont);
  with LogFont do
  begin
    lfEscapement  := angle *10;
    lfOrientation := angle *10;
    lfPitchAndFamily := FIXED_PITCH or FF_DONTCARE;
  end;
  CV.Font.Handle := CreateFontIndirect(LogFont);
  SetBkMode(CV.Handle, TRANSPARENT);
  CV.TextOut(x, y, sText);
  CV.Font.Assign(SaveFont);
  SaveFont.Free;
end;

In GDIPlus there are the functions which could deal with this.

If you're desperate You could make a label as normal, copy it to a BitMap, rotate it and draw the new BitMap.

A third idea is to rotate your monitor through 90 degrees but I find the cables get all tangled up.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...