Post Reply 
Result justified?
06-08-2015, 05:46 PM (This post was last modified: 06-08-2015 05:49 PM by eried.)
Post: #5
RE: Result justified?
(06-08-2015 09:07 AM)Heino Wrote:  Hello DrD,

thank for your answer.

You are right it`s degree.

But I mean:

The output figures should be aligned to the right side, no matter if they have a positive or negative sign.
Which settings have to be changed to achieve that?

Best Regards
Heino

There is no setting to do that, but you can measure the output first:
Code:
TEXTOUTR(txt,x,y)
BEGIN LOCAL v2,c,b,w,v1;v2:=100;c:=RGB(255,0,0);b:=RGB(255,255,0);w:=RGB(0,255,0);
dimgrob_p(G1,v2,1,c);TEXTOUT_P(txt,G1,0,0,0,b,v2,w);FOR v1 FROM 3 TO v2 DO 
if GETPIX_P(G1,v1,0)==c then break;END;END;TEXTOUT_P(txt,x-v1,y);END;

EXPORT KorTrans()
BEGIN
  LOCAL X,Y,φ,Xs,Ys;
  local black:=rgb(0,0,0);
  
  //  Home variable settings
  HAngle:=1;  //  Set angle mode to degrees
  HDigits:=2; //  Set Digits to 2
  
  RECT_P();
  
  INPUT({{X,[0],{20,15,0}},
  {Y,[0],{20,15,1}},
  {φ,[0],{20,15,2}}},
  "Koordinatentransformation",
  {"X [KN]","Y [KN]","φ [°]"},
  {"","",""});
  
  Xs:=ROUND((X*COS(φ)-Y*SIN(φ)),2);  //  Angle mode is degrees
  Ys:=ROUND((X*SIN(φ)+Y*COS(φ)),2);
  
  
  TEXTOUTR(Xs,150,25);
  TEXTOUTR(Ys,150,50);
  
  FREEZE;
END;

   

My website: erwin.ried.cl
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Result justified? - Heino - 06-07-2015, 07:54 PM
RE: Result justified? - Heino - 06-07-2015, 07:58 PM
RE: Result justified? - DrD - 06-07-2015, 11:09 PM
RE: Result justified? - Heino - 06-08-2015, 09:07 AM
RE: Result justified? - eried - 06-08-2015 05:46 PM
RE: Result justified? - Heino - 06-08-2015, 07:28 PM
RE: Result justified? - DrD - 06-08-2015, 09:23 PM



User(s) browsing this thread: 1 Guest(s)