Calculates the bottom right of a view using its subviews

 @return [Hash]
763418
def subviews_bottom_right(view, args = {})
      w = 0
      h = 0

      view.subviews.each do |subview|
        rect = subview.rmq.frame
        w = [rect.right, w].max
        h = [rect.bottom, h].max
      end

      rect = view.rmq.frame
      w = rect.width if (w == 0 || args[:only_height])
      h = rect.height if (h == 0 || args[:only_width])

      {w: (w + (args[:right] || 0)), h: (h + (args[:bottom] || 0))}
    end
755204
function nextRight(v) {
  var children = v.children;
  return children ? children[children.length - 1] : v.t;
}
948805
def layout
      # This assumes that the container overlaps all the children.

      # Move all children if we have moved.
      @children.each.with_index do |child, index|
        child.x = padding_left + x
        child.y = padding_top + y
      end

      # Make us as wrap around the largest child.
      rect.width = (@children.map {|c| c.width }.max || 0) + padding_left + padding_right
      rect.height = (@children.map {|c| c.height }.max || 0) + padding_top + padding_bottom

      super
    end
516303
def above(from_view, f={})
      _calculate_frame(f, from: from_view, relative_to: { x: :reset, y: :above })
    end
628025
function calculateHorizontals(segments) {
		var isRTL = opt('isRTL');
		for (var i=0; i<segments.length; i++) {
			var segment = segments[i];

			// Determine functions used for calulating the elements left/right coordinates,
			// depending on whether the view is RTL or not.
			// NOTE:
			// colLeft/colRight returns the coordinate butting up the edge of the cell.
			// colContentLeft/colContentRight is indented a little bit from the edge.
			var leftFunc = (isRTL ? segment.isEnd : segment.isStart) ? colContentLeft : colLeft;
			var rightFunc = (isRTL ? segment.isStart : segment.isEnd) ? colContentRight : colRight;

			var left = leftFunc(segment.leftCol);
			var right = rightFunc(segment.rightCol);
			segment.left = left;
			segment.outerWidth = right - left;
		}
	}
1037413
function () {
    _setLayout(_layout === LAYOUTS.topToBottom ?
        LAYOUTS.leftToRight :
        LAYOUTS.topToBottom);
    return _layout === LAYOUTS.topToBottom;
  }
204425
private void calculateMasksBounds() {
        leftMask = new RectF(0, 0, getWidth() / 2 - toCurrentScale(optimalPageWidth) / 2, getHeight());
        rightMask = new RectF(getWidth() / 2 + toCurrentScale(optimalPageWidth) / 2, 0, getWidth(), getHeight());
    }
459201
function(left, right) {
                const leftIndex = entryPoints.indexOf(left.names[0]);
                const rightIndex = entryPoints.indexOf(right.names[0]);
                let direction = 0;

                if (leftIndex > rightIndex) {
                    direction = 1;
                } else if (leftIndex < rightIndex) {
                    direction = -1;
                }

                return direction;
            }
726389
def overlay(top, bottom, maxval=None):
    
    if maxval is None:
        maxval = np.maximum(top.max(), bottom.max())

    res = ((2 * top / maxval - 1) * bottom + 2 * top) * bottom / maxval
    return res.clip(min=0)
371256
def _right_zero_blocks(self, r):
    """"""
    if not self._include_off_diagonal:
      return self._block_rows - r - 1
    elif self._upper:
      return 0
    elif self._include_diagonal:
      return self._block_rows - r - 1
    else:
      return self._block_rows - r
503789
def _bottom_position(self, resource):
        
        image = self._get_scaled_image(resource)

        left = int(round(resource.size[0] // 2 - image.size[0] // 2))
        upper = int(round(resource.size[1] - image.size[1]))

        return image, left, upper
701245
def _calculate_edges(self):
        
        # Calculate the left edge of the label.
        left = self.specs.left_margin
        left += (self.specs.label_width * (self._position[1] - 1))
        if self.specs.column_gap:
            left += (self.specs.column_gap * (self._position[1] - 1))
        left *= mm

        # And the bottom.
        bottom = self.specs.sheet_height - self.specs.top_margin
        bottom -= (self.specs.label_height * self._position[0])
        if self.specs.row_gap:
            bottom -= (self.specs.row_gap * (self._position[0] - 1))
        bottom *= mm

        # Done.
        return float(left), float(bottom)
727954
def rectangle(upper_left_x, upper_left_y, lower_right_x, lower_right_y)
      primitive 'rectangle ' + format('%g,%g %g,%g',
                                      upper_left_x, upper_left_y, lower_right_x, lower_right_y)
    end
1176269
function () {

        var lng = this.uis.length, i, u,  h=0, px=0, tmph=0;
        for( i = 0; i < lng; i++){
            u = this.uis[i];
            if( !u.autoWidth ){

                if(px===0) h += u.h+1;
                else {
                    if(tmph<u.h) h += u.h-tmph;
                }
                tmph = u.h;

                //tmph = tmph < u.h ? u.h : tmph;
                px += u.w;
                if( px+u.w > this.w ) px = 0;

            }
            else h += u.h+1;
        }

        return h;
    }
1162722
def current_view(self):
        ''''''
        state = self.state
        return (state.lat, state.lon, state.width, state.height,
                state.ground_width, state.mt.tiles_pending())
263702
def parents(*working_selectors)
      normalize_selectors(working_selectors)

      filter(uniq: true) do |view|
        superviews = all_superviews_for(view)

        if RMQ.is_blank?(working_selectors)
          superviews
        else
          superviews.inject([]) do |subview, out|
            out << subview if match(subview, working_selectors)
            out
          end
        end
      end
    end
1193483
def from_top_left(from_layer=nil, f=nil)
      if from_layer.is_a?(Hash)
        f = from_layer
        from_layer = nil
      end
      f ||= {}
      from_layer ||= target.superlayer
      _calculate_frame(f, from: from_layer, relative_to: { x: :min, y: :min })
    end