OBJ_RECTANGLE_LABEL Problems

 

Good afternoon colleagues, I'm starting to think that I have some serious understanding problem, but I can't figure this out.

It's a rectangle, and I want it to be built from the bottom left corner. This is the code:

   // ChartIdent is ChartID()

   ObjectCreate(ChartIdent, "BGRectangle", OBJ_RECTANGLE_LABEL, 0,0,0);
   ObjectSetInteger(ChartIdent,"BGRectangle",OBJPROP_XDISTANCE,10);
   ObjectSetInteger(ChartIdent,"BGRectangle",OBJPROP_YDISTANCE,10);
   ObjectSetInteger(ChartIdent,"BGRectangle",OBJPROP_XSIZE,550);
   ObjectSetInteger(ChartIdent,"BGRectangle",OBJPROP_YSIZE,310);
   ObjectSetInteger(ChartIdent,"BGRectangle",OBJPROP_BGCOLOR,C'41,41,41');
   ObjectSetInteger(ChartIdent,"BGRectangle",OBJPROP_BORDER_TYPE,BORDER_FLAT);
   ObjectSetInteger(ChartIdent,"BGRectangle",OBJPROP_CORNER,CORNER_LEFT_LOWER);
   ObjectSetInteger(ChartIdent,"BGRectangle",OBJPROP_COLOR,Color1);
   ObjectSetInteger(ChartIdent,"BGRectangle",OBJPROP_STYLE,STYLE_SOLID);
   ObjectSetInteger(ChartIdent,"BGRectangle",OBJPROP_WIDTH,1);
   ObjectSetInteger(ChartIdent,"BGRectangle",OBJPROP_BACK,false);
   ObjectSetInteger(ChartIdent,"BGRectangle",OBJPROP_SELECTED,false);
   ObjectSetInteger(ChartIdent,"BGRectangle",OBJPROP_SELECTABLE,false);
   ObjectSetInteger(ChartIdent,"BGRectangle",OBJPROP_HIDDEN,true);
   ObjectSetInteger(ChartIdent,"BGRectangle",OBJPROP_ZORDER,0);


This is the property of the created object, everything seems fine:


And now let's see what I'm really getting: (the rectangle seems to be building "inside" the margins, instead of outwards)


I have even tried the anchor point (out of desperation)

ObjectSetInteger(ChartIdent,"BGRectangle",OBJPROP_ANCHOR,ANCHOR_LEFT_LOWER);


And (i know, it's ridicolous)

OBJPROP_DEGREE


Need a hand with this. Thank you very much in advance

 
Enrique Enguix:

Good afternoon colleagues, I'm starting to think that I have some serious understanding problem, but I can't figure this out.

It's a rectangle, and I want it to be built from the bottom left corner. This is the code:


This is the property of the created object, everything seems fine:


And now let's see what I'm really getting: (the rectangle seems to be building "inside" the margins, instead of outwards)


I have even tried the anchor point (out of desperation)


And (i know, it's ridicolous)


Need a hand with this. Thank you very much in advance

The anchor does not apply to rectangle labels .

I got the same issue , the temp fix is to set the y size as negative

 
Lorentzos Roussos #:

The anchor does not apply to rectangle labels .

I got the same issue , the temp fix is to set the y size as negative

Yes, it was a bit of a random test.  I'll try your alternative, if it works for now, it's enough.  Thanks Lorentzos!
Reason: