View Full Version : paint smart
Getdropped
07-31-2012, 11:28 PM
So here is the issue, im using:
SMART_DrawDotsEx(False, ColorTPA, clYellow);
to paint my tpa but it paints on the smart at the wrong position is it is the 50 px shift.... not really sure why will post a pic to show you what i mean.
x[Warrior]x3500
07-31-2012, 11:42 PM
it prints at teh TRUE coords. not the adjusted ones. simply adjust it yourself for printin tpas
Getdropped
08-01-2012, 12:16 AM
x3500;1078972']it prints at teh TRUE coords. not the adjusted ones. simply adjust it yourself for printin tpas
That is what i thought ii have been playing around with the smart draw function and im not quite sure what is going on because even if I change it there seems to be no change to the location of the points
current code:
SMART_Canvas.Canvas.Pixels[pixels[i].x, pixels[i].y ] := color;
What I thought might work:
SMART_Canvas.Canvas.Pixels[pixels[i].x, (pixels[i].y + 50)] := color;
But it still paints the true x, y values....
Brandon
08-01-2012, 12:24 AM
Yes it paints the true values because the Offset does not affect any drawing functions. That stuff is internal (Built into simba itself). It's the same as the colour picker.
Nothing I can do through SRL. Well.. I could offset it all by 50 just like in the ghetto fix but I'm not too sure about that.. I'll ask Wiz if there's another way. I don't want to have to offset it by 50 because if the bar changes again, I'll have to change it all again..
Also the code you posted cannot possibly work. Smart_Canvas is a TMufasaBitmap. It has no such member as Canvas. So.. you cannot do Smart_Canvas.Canvas.Pixels.
Getdropped
08-01-2012, 12:52 AM
Yes it paints the true values because the Offset does not affect any drawing functions. That stuff is internal (Built into simba itself). It's the same as the colour picker.
Nothing I can do through SRL. Well.. I could offset it all by 50 just like in the ghetto fix but I'm not too sure about that.. I'll ask Wiz if there's another way. I don't want to have to offset it by 50 because if the bar changes again, I'll have to change it all again..
Also the code you posted cannot possibly work. Smart_Canvas is a TMufasaBitmap. It has no such member as Canvas. So.. you cannot do Smart_Canvas.Canvas.Pixels.
Oh ok.... I thought since it was changing the pixel color at the position I could just change the y value of the px so it would act like the off set.... ya no luck... :/ oh well glade to hear you looking into it ;)
Flight
08-01-2012, 12:58 AM
If you have a TPA just for the painting you can add and offset of Y+50 to each point in the array before painting it to SMART. But you'll want to keep this TPA separate from your main TPA. Like so:
procedure PaintTPA;
var
i: Integer;
TPA,ColTPA: TPointArray;
begin
FindColorsSpiralTolerance(MSCX, MSCY, TPA, YOUR_COLOR, MSX1, MSY1, MSX2, MSY2, TOLERANCE);
ColTPA := TPA;
for i := 0 to High(ColTPA) do
ColTPA[i].Y := (ColTPA[i].Y+50);
SMART_DrawDotsEx(False, ColTPA, clYellow);
end;
Sloppy, but you get the idea. ;)
Getdropped
08-01-2012, 01:07 AM
If you have a TPA just for the painting you can add and offset of Y+50 to each point in the array before painting it to SMART. But you'll want to keep this TPA separate from your main TPA. Like so:
procedure PaintTPA;
var
i: Integer;
TPA,ColTPA: TPointArray;
begin
FindColorsSpiralTolerance(MSCX, MSCY, TPA, YOUR_COLOR, MSX1, MSY1, MSX2, MSY2, TOLERANCE);
ColTPA := TPA;
for i := 0 to High(ColTPA) do
ColTPA[i].Y := (ColTPA[i].Y+50);
SMART_DrawDotsEx(False, ColTPA, clYellow);
end;
Sloppy, but you get the idea. ;)
That works great man +1 ;) thank you so much :p
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.