Returns the rectangle of a check box drawn as a sub element of widget
540345
def widgetSubCheckBoxRect(widget, option):
    
    opt = QtWidgets.QStyleOption()
    opt.initFrom(widget)
    style = widget.style()
    return style.subElementRect(QtWidgets.QStyle.SE_ViewItemCheckIndicator, opt, widget)
415056
def render(self, name, value, attrs=None, renderer=None):
        
        wrapped = self.widget.render(name, value, attrs, renderer)
        checkbox_name = self.clear_checkbox_name(name)
        checkbox_id = self.clear_checkbox_id(checkbox_name)
        checkbox_label = self.clear_checkbox_label
        checkbox = self.checkbox.render(
            checkbox_name,
            value == self.empty_value,
            attrs={'id': checkbox_id},
            renderer=renderer)
        return mark_safe(self.template.format(
            conditional_escape(wrapped),
            conditional_escape(checkbox_id),
            conditional_escape(checkbox_label),
            conditional_escape(checkbox)))
966199
def draw_rectangle(x, y, width, height, attr = {})
            last_content_stream.draw_rectangle(x, y, width, height, attr); self
        end
210021
private void recalcViewbox() {
    final Element root = plot.getRoot();
    // Reset plot attributes
    SVGUtil.setAtt(root, SVGConstants.SVG_WIDTH_ATTRIBUTE, "20cm");
    SVGUtil.setAtt(root, SVGConstants.SVG_HEIGHT_ATTRIBUTE, SVGUtil.fmt(20 * plotmap.getHeight() / plotmap.getWidth()) + "cm");
    String vb = "0 0 " + SVGUtil.fmt(plotmap.getWidth()) + " " + SVGUtil.fmt(plotmap.getHeight());
    SVGUtil.setAtt(root, SVGConstants.SVG_VIEW_BOX_ATTRIBUTE, vb);
  }
971610
function getCheckbox(checked) {
  return checked ? utils.chalk.green(utils.figures.radioOn) : utils.figures.radioOff;
}
547165
def _box_click(self, event):
        """"""
        x, y, widget = event.x, event.y, event.widget
        elem = widget.identify("element", x, y)
        if "image" in elem:
            # a box was clicked
            item = self.identify_row(y)
            if self.tag_has("unchecked", item) or self.tag_has("tristate", item):
                self._check_ancestor(item)
                self._check_descendant(item)
            else:
                self._uncheck_descendant(item)
                self._uncheck_ancestor(item)
1174170
public Rectangle getRect1() {
        verifyPropertyPresence(RECT1);
        //noinspection unchecked
        return mapToRect((Map<String, Object>) getCommandResult().get(RECT1));
    }
886313
def draw(self):
        """"""
        if not self.visible:
            return

        # Blit the current checkbox's image.

        if self.isEnabled:
            if self.mouseIsDown and self.lastMouseDownOverButton and self.mouseOverButton:
                if self.value:
                    self.window.blit(self.surfaceOnDown, self.loc)
                else:
                    self.window.blit(self.surfaceOffDown, self.loc)
            else:
                if self.value:
                    self.window.blit(self.surfaceOn, self.loc)
                else:
                    self.window.blit(self.surfaceOff, self.loc)


        else:
            if self.value:
                self.window.blit(self.surfaceOnDisabled, self.loc)
            else:
                self.window.blit(self.surfaceOffDisabled, self.loc)
245017
function getElementPosition(element) {
  const rect = getElementRect(element);
  return {
    x: rect.left,
    y: rect.top,
    width: rect.right - rect.left,
    height: rect.bottom - rect.top
  };
}
1374838
function() {
    var e = this._element;
    if (!e) return null;
    if (typeof e.getBoundingClientRect !== 'function') {
      console.error("[wdg.rect] This element has non `getBoundingClientRect` function:", e);
    }
    var r = e.getBoundingClientRect();
    if( typeof r.width === 'undefined' ) r.width = r.right - r.left;
    if( typeof r.height === 'undefined' ) r.height = r.bottom - r.top;
    return r;
  }
490119
def make_check_box(checked:, text:)
      box_y = cursor
      bounding_box [0, box_y], width: 7, height: 7 do
        stroke_bounds
        if checked
          move_down 1
          text 'X', align: :center, size: 6, style: :bold
        end
      end
      bounding_box [9, box_y], width: bounds.width - 9, height: 10 do
        text text, size: 10
      end
    end
1297096
def rect(box, draw, trans)
      use_cairo do |cc|
        cc.rotate_about(box.x, box.y, trans.angle)
        cc.rounded_rectangle(box.x, box.y, box.width, box.height,
                             box.x_radius, box.y_radius)
        cc.fill_n_stroke(draw)
      end
    end
825814
public Rectangle getRect2() {
        verifyPropertyPresence(RECT2);
        //noinspection unchecked
        return mapToRect((Map<String, Object>) getCommandResult().get(RECT2));
    }
298722
def eventFilter(self, widget, event):
        
        if event.type() == QEvent.MouseButtonPress:
            if event.button() == Qt.LeftButton:
                self.sig_canvas_clicked.emit(self)
        return super(FigureThumbnail, self).eventFilter(widget, event)
1336837
def rectangle(self, rect, attr=None, fill=u' '):
        '''
        x0, y0, x1, y1 = rect
        n = DWORD(0)
        if attr is None:
            attr = self.attr
        for y in range(y0, y1):
            pos = self.fixcoord(x0, y)
            self.FillConsoleOutputAttribute(self.hout, attr, x1 - x0, 
                                            pos, byref(n))
            self.FillConsoleOutputCharacterW(self.hout, ord(fill[0]), x1 - x0,
                                             pos, byref(n))
965064
def on_unicode_checkbox(self, w=None, state=False):
        """"""
        logging.debug("unicode State is %s", state)

        # Update the controller to the state of the checkbox
        self.controller.smooth_graph_mode = state
        if state:
            self.hline = urwid.AttrWrap(
                urwid.SolidFill(u'\N{LOWER ONE QUARTER BLOCK}'), 'line')
        else:
            self.hline = urwid.AttrWrap(urwid.SolidFill(u' '), 'line')

        for graph in self.graphs.values():
            graph.set_smooth_colors(state)

        self.show_graphs()
904471
def _box_in_box(el, child):
    
    return all([
        float(el.get('x0')) <= float(child.get('x0')),
        float(el.get('x1')) >= float(child.get('x1')),
        float(el.get('y0')) <= float(child.get('y0')),
        float(el.get('y1')) >= float(child.get('y1')),
    ])