Beispiel #1
0
	public override long GetOffsetByDisplayInfo(int x, int y, out int digit, out GetOffsetFlags flags)
	{
		flags = 0;
		int row = y / drawer.Height;
		long off = row * bpr + areaGroup.Offset;
		if (off >= areaGroup.Buffer.Size)
			flags |= GetOffsetFlags.Eof;

		digit = 0;

		return off;
	}
Beispiel #2
0
        public override long GetOffsetByDisplayInfo(int x, int y, out int digit, out GetOffsetFlags flags)
        {
            flags = 0;
            int  row = y / drawer.Height;
            int  col = x / drawer.Width;
            long off = (row * bpr + col) + areaGroup.Offset;

            if (off >= areaGroup.Buffer.Size)
            {
                flags |= GetOffsetFlags.Eof;
            }

            digit = 0;

            return(off);
        }
Beispiel #3
0
	public override long GetOffsetByDisplayInfo(int x, int y, out int digit, out GetOffsetFlags flags)
	{
		flags = 0;
		int groupWidth = (grouping * dpb * drawer.Width + drawer.Width);

		int row = y / drawer.Height;
		int group = x / groupWidth;
		int groupByte = (x - group * groupWidth) / (dpb * drawer.Width);

		digit = (x - group * groupWidth - groupByte * dpb * drawer.Width) / drawer.Width;

		if (groupByte >= grouping) {
			groupByte = grouping - 1;
			flags |= GetOffsetFlags.Abyss;
		}

		long off = row * bpr + (group * grouping + groupByte) + areaGroup.Offset;
		if (off >= areaGroup.Buffer.Size)
			flags |= GetOffsetFlags.Eof;

		return off;

	}
Beispiel #4
0
 /// <summary>
 /// Gets the offset in the buffer that is displayed at specified location in the area
 /// </summary>
 /// <param name="x">
 /// The X coordinate of the queried location.
 /// </param>
 /// <param name="y">
 /// The Y coordinate of the queried location.
 /// </param>
 /// <param name="digit">
 /// The digit of the byte at the specified location.
 /// </param>
 /// <param name="rflags">
 /// Some flags with additional info about the location (<see cref="GetOffsetFlags"/>).
 /// </param>
 /// <returns>
 /// The offset of the byte at the specified location.
 /// </returns>
 abstract public long GetOffsetByDisplayInfo(int x, int y, out int digit, out GetOffsetFlags rflags);