public int getTileCompWidth(int t, int c, int rl)
{
int tIdx = TileIdx;
if (t != tIdx)
{
throw new System.InvalidOperationException("Asking the tile-component width of a tile " + "different from the current one.");
}
int ntulx;
int dl = mdl[c] - rl;
// Calculate starting X of next tile X-wise at reference grid hi-res
ntulx = (ctX < ntX - 1)?px + (ctX + 1) * ntW:ax + imgW;
// Convert reference grid hi-res to component grid hi-res
ntulx = (ntulx + hd.getCompSubsX(c) - 1) / hd.getCompSubsX(c);
// Starting X of current tile at component grid hi-res is culx[c]
// The difference at the rl level is the width
return (ntulx + (1 << dl) - 1) / (1 << dl) - (culx[c] + (1 << dl) - 1) / (1 << dl);
}