def _get_offset_size_rect(self, offset: int, size: int) -> QRectF:
        """
        Given a byte offset `offset` and number of bytes `size`, get a rect to draw.
        """
        if self._total_size == 0:
            return None
        x = offset / self._total_size * self._width
        width = size / self._total_size * self._width
        return QRectF(x, 0, width, self._height)

        Given a byte offset `offset` and number of bytes `size`, get a rect to draw.
        
angrmanagement/ui/widgets/qtrace_map.py