rossati Active Member Licensed User Longtime User Feb 2, 2023 #1 Hi I am drawing an horizontal line at a fixed top coordinate in a canvas associated to a panel (B4A) and that line appears at differents levels depending oh the panel Height. This means that the canvas coordinates are relative to the panel dimension?? Thanks
Hi I am drawing an horizontal line at a fixed top coordinate in a canvas associated to a panel (B4A) and that line appears at differents levels depending oh the panel Height. This means that the canvas coordinates are relative to the panel dimension?? Thanks
B Brian Dean Well-Known Member Licensed User Longtime User Feb 2, 2023 #2 ... that line appears at differents levels depending oh the panel Height. Click to expand... I think that we need to see your code. Canvas coordinates are not related to the canvas size. This code ... B4X: Copy Dim cvs As Canvas cvs.Initialize(Panel1) cvs.DrawLine(0, 15, 100%x, 15, xui.Color_Black, 2dip) Panel1.Invalidate ... will draw a horizontal line that is always the same distance (on the same device) from the top of Panel1 no matter what the height of Panel1. Upvote 0
... that line appears at differents levels depending oh the panel Height. Click to expand... I think that we need to see your code. Canvas coordinates are not related to the canvas size. This code ... B4X: Copy Dim cvs As Canvas cvs.Initialize(Panel1) cvs.DrawLine(0, 15, 100%x, 15, xui.Color_Black, 2dip) Panel1.Invalidate ... will draw a horizontal line that is always the same distance (on the same device) from the top of Panel1 no matter what the height of Panel1.
E emexes Expert Licensed User Longtime User Feb 3, 2023 #3 rossati said: and that line appears at differents levels depending oh the panel Height. Click to expand... is that levels as in RGB intensity levels, or levels as in vertical displacements? Upvote 0
rossati said: and that line appears at differents levels depending oh the panel Height. Click to expand... is that levels as in RGB intensity levels, or levels as in vertical displacements?