Returns the viewBox attribute of the current SVG document.

@return the document's viewBox attribute as a {@code android.graphics.RectF} object, or null if not set.
@throws IllegalArgumentException if there is no current SVG document loaded.
166036
@SuppressWarnings({"WeakerAccess", "unused"})
   public RectF  getDocumentViewBox()
   {
      if (this.rootElement == null)
         throw new IllegalArgumentException("SVG document is empty");

      if (this.rootElement.viewBox == null)
         return null;

      return this.rootElement.viewBox.toRectF();       
   }
711987
public ZoomableGraphicsContext getDocumentGraphicsContext2D() {
		if (this.documentGraphicsContext == null) {
			final CenteringTransform transform = new CenteringTransform(
					invertedAxisXProperty(),
					invertedAxisYProperty(),
					viewportBoundsProperty());
			this.documentGraphicsContext = new ZoomableGraphicsContext(
					getGraphicsContext2D(),
					scaleValueProperty(),
					documentBoundsProperty(),
					viewportBoundsProperty(),
					widthProperty(),
					heightProperty(),
					drawableElementBudgetProperty(),
					transform);
		}
		return this.documentGraphicsContext;
	}
917547
public String getOid()
    {
        String ret = null;
        if (isValid()) {
            ret = getType().getId() + "." + getId();
        }
        return ret;
    }
583282
public Graphics2D renderContent()
    {
        View view = null;
        ViewFactory factory = getEditorKit().getViewFactory();
        if (factory instanceof SwingBoxViewFactory)
        {
            view = ((SwingBoxViewFactory) factory).getViewport();
        }

        if (view != null)
        {
            int w = (int) view.getPreferredSpan(View.X_AXIS);
            int h = (int) view.getPreferredSpan(View.Y_AXIS);

            Rectangle rec = new Rectangle(w, h);

            BufferedImage img = new BufferedImage(w, h,
                    BufferedImage.TYPE_INT_RGB);
            Graphics2D g = img.createGraphics();
            g.setClip(rec);
            view.paint(g, rec);

            return g;
        }

        return null;
    }
667100
protected String getElementAttribute(Element element, String attrName)
    {
        Attr attr = element.getAttributeNode(attrName);
        return attr != null ? attr.getValue() : null;
    }
1184184
function getBoundingVisibleRect(el) {
    // Get the element bounding rect in the layout viewport.
    const rect = getBoundingRect(el);

    // Apply the visual viewport transform (i.e. pinch-zoom) to the bounding
    // rect. The viewportX|Y values are in CSS pixels so they don't change
    // with page scale. We first translate so that the viewport offset is
    // at the origin and then we apply the scaling factor.
    const scale = getPageScaleFactor();
    const visualViewportX = chrome.gpuBenchmarking.visualViewportX();
    const visualViewportY = chrome.gpuBenchmarking.visualViewportY();
    rect.top = (rect.top - visualViewportY) * scale;
    rect.left = (rect.left - visualViewportX) * scale;
    rect.width *= scale;
    rect.height *= scale;

    // Get the window dimensions.
    const windowHeight = getWindowHeight();
    const windowWidth = getWindowWidth();

    // Then clip the rect to the screen size.
    rect.top = clamp(0, rect.top, windowHeight);
    rect.left = clamp(0, rect.left, windowWidth);
    rect.height = clamp(0, rect.height, windowHeight - rect.top);
    rect.width = clamp(0, rect.width, windowWidth - rect.left);

    return rect;
  }
1042579
private void  symbol(Attributes attributes) throws SVGParseException
   {
      debug("<symbol>");

      if (currentElement == null)
         throw new SVGParseException("Invalid document. Root element must be <svg>");
      SVG.Symbol  obj = new SVG.Symbol();
      obj.document = svgDocument;
      obj.parent = currentElement;
      parseAttributesCore(obj, attributes);
      parseAttributesStyle(obj, attributes);
      parseAttributesConditional(obj, attributes);
      parseAttributesViewBox(obj, attributes);
      currentElement.addChild(obj);
      currentElement = obj;
   }
1340943
public static final Box getBox(CSSBoxView v)
    {

        try
        {
            AttributeSet attr = v.getAttributes();
            return (Box) attr.getAttribute(Constants.ATTRIBUTE_BOX_REFERENCE);
        } catch (Exception e)
        {
            throw new IllegalStateException(e);
        }
    }
615239
function () {
		var wrapper = this,
			element = wrapper.element,
			bBox = wrapper.bBox;

		// faking getBBox in exported SVG in legacy IE
		if (!bBox) {
			// faking getBBox in exported SVG in legacy IE (is this a duplicate of the fix for #1079?)
			if (element.nodeName === 'text') {
				element.style.position = ABSOLUTE;
			}

			bBox = wrapper.bBox = {
				x: element.offsetLeft,
				y: element.offsetTop,
				width: element.offsetWidth,
				height: element.offsetHeight
			};
		}

		return bBox;
	}
717397
@InterfaceAudience.Public
    public Document getDocument() {
        if (getDocumentId() == null) {
            return null;
        }
        assert (database != null);
        Document document = database.getDocument(getDocumentId());
        document.loadCurrentRevisionFrom(this);
        return document;
    }
780840
@SuppressWarnings("unchecked")
    public static <T extends View> T currentView() {
        if (currentMount == null) {
            return null;
        }
        return (T) currentMount.iterator.currentView();
    }
1103664
public ViewHolder getChildViewHolder(View child) {
        final ViewParent parent = child.getParent();
        if (parent != null && parent != this) {
            throw new IllegalArgumentException("View " + child + " is not a direct child of " +
                    this);
        }
        return getChildViewHolderInt(child);
    }
31096
@SuppressWarnings("ConstantConditions")
    @NonNull
    @Override
    public View getView(int position, View convertView, @NonNull ViewGroup parent) {
        final File file = super.getItem(position);
        if (file == null) return super.getView(position, convertView, parent);
        final boolean isSelected = _selected.get(file.hashCode(), null) != null;
        if (_getView != null) {
            return _getView.getView(file, isSelected, false, convertView, parent,
                LayoutInflater.from(getContext()));
        }

        ViewGroup view = (ViewGroup) super.getView(position, convertView, parent);

        TextView tvName = view.findViewById(R.id.text);
        TextView tvSize = view.findViewById(R.id.txt_size);
        TextView tvDate = view.findViewById(R.id.txt_date);
        //ImageView ivIcon = (ImageView) view.findViewById(R.id.icon);

        tvDate.setVisibility(View.VISIBLE);
        tvName.setText(file.getName());
        Drawable icon;
        if (file.isDirectory()) {
            icon = _defaultFolderIcon.getConstantState().newDrawable();
            tvSize.setText("");
            if (file.lastModified() != 0L) {
                tvDate.setText(_formatter.format(new Date(file.lastModified())));
            } else {
                tvDate.setVisibility(View.GONE);
            }
        } else {
            Drawable d = null;
            if (_resolveFileType) {
                d = UiUtil.resolveFileTypeIcon(getContext(), Uri.fromFile(file));
                if (d != null) {
                    d = new WrappedDrawable(d, 24, 24);
                }
            }
            if (d == null) {
                d = _defaultFileIcon;
            }
            icon = d.getConstantState().newDrawable();
            tvSize.setText(FileUtil.getReadableFileSize(file.length()));
            tvDate.setText(_formatter.format(new Date(file.lastModified())));
        }
        if (file.isHidden()) {
            final PorterDuffColorFilter filter = new PorterDuffColorFilter(0x80ffffff,
                PorterDuff.Mode.SRC_ATOP);
            icon.mutate().setColorFilter(filter);
        }
        tvName.setCompoundDrawablesWithIntrinsicBounds(icon, null, null, null);

        View root = view.findViewById(R.id.root);
        if (root.getBackground() == null) {
            root.setBackgroundResource(R.color.li_row_background);
        }
        if (!isSelected) {
            root.getBackground().clearColorFilter();
        } else {
            root.getBackground().setColorFilter(_colorFilter);
        }

        return view;
    }
1345656
public Canvas getViewPanel() {
		VLayout mainLayout = new VLayout();
		mainLayout.setWidth100();
		mainLayout.setHeight100();
		mainLayout.setBackgroundColor("#A0A0A0");

		HLayout layout = new HLayout();
		layout.setWidth100();
		layout.setHeight100();
		layout.setMembersMargin(10);
		layout.setMargin(10);

		// ---------------------------------------------------------------------
		// Create the left-side (map and tabs):
		// ---------------------------------------------------------------------
		final MapWidget map = new MapWidget("mapRasterizingMain", "appRasterizing");
		final Toolbar toolbar = new Toolbar(map, WidgetLayout.toolbarLargeButtonSize);
		toolbar.setBackgroundColor("#647386");
		toolbar.setBackgroundImage("");
		toolbar.setBorder("0px");

		map.getMapModel().addMapModelChangedHandler(new MapModelChangedHandler() {

			public void onMapModelChanged(MapModelChangedEvent event) {
				// switch all labels on
				for (Layer layer : map.getMapModel().getLayers()) {
					layer.setLabeled(true);
				}
			}
		});

		map.getMapModel().addLayerSelectionHandler(new LayerSelectionHandler() {

			public void onSelectLayer(LayerSelectedEvent event) {
				for (Layer layer : map.getMapModel().getLayers()) {
					if (layer.isSelected()) {
						layer.setVisible(true);
					} else {
						layer.setVisible(false);
					}
				}
			}

			public void onDeselectLayer(LayerDeselectedEvent event) {
			}
		});

		VLayout mapLayout = new VLayout();
		mapLayout.addMember(toolbar);
		mapLayout.addMember(map);
		mapLayout.setHeight("65%");

		VLayout leftLayout = new VLayout();
		leftLayout.setBorder("10px solid #777777");
		leftLayout.setStyleName("round_corner");
		leftLayout.addMember(mapLayout);

		layout.addMember(leftLayout);

		// ---------------------------------------------------------------------
		// Create the right-side (overview map, layer-tree, legend):
		// ---------------------------------------------------------------------
		final SectionStack sectionStack = new SectionStack();
		sectionStack.setBorder("10px solid #777777");
		sectionStack.setStyleName("round_corner");
		sectionStack.setVisibilityMode(VisibilityMode.MULTIPLE);
		sectionStack.setCanReorderSections(true);
		sectionStack.setCanResizeSections(false);
		sectionStack.setSize("250px", "100%");

		// Overview map layout:
		SectionStackSection section1 = new SectionStackSection("Overview map");
		section1.setExpanded(true);
		OverviewMap overviewMap = new OverviewMap("mapRasterizingOverview", "appRasterizing", map, false, true);
		overviewMap.setTargetMaxExtentRectangleStyle(new ShapeStyle("#888888", 0.3f, "#666666", 0.75f, 2));
		overviewMap.setRectangleStyle(new ShapeStyle("#6699FF", 0.3f, "#6699CC", 1f, 2));
		section1.addItem(overviewMap);
		sectionStack.addSection(section1);

		// LayerTree layout:
		SectionStackSection section2 = new SectionStackSection("Layer tree");
		section2.setExpanded(true);
		LayerTree layerTree = new LayerTree(map);
		section2.addItem(layerTree);
		sectionStack.addSection(section2);

		// Legend layout:
		SectionStackSection section3 = new SectionStackSection("Legend");
		section3.setExpanded(true);
		Legend legend = new Legend(map.getMapModel());
		legend.setBackgroundColor("#FFFFFF");
		section3.addItem(legend);
		sectionStack.addSection(section3);

		// Putting the right side layouts together:
		layout.addMember(sectionStack);

		// ---------------------------------------------------------------------
		// Finally draw everything:
		// ---------------------------------------------------------------------
		mainLayout.addMember(layout);
		mainLayout.draw();
		return mainLayout;
	}
913963
public Canvas getViewPanel() {
		VLayout layout = new VLayout(5);
		layout.setPadding(5);

		MapWidget mapWidget = new MapWidget("mapGuwCountries", "appGuw");
		final RibbonBarLayout ribbon = new RibbonBarLayout(mapWidget, "appGuw", "guwRibbonBar2");
		ribbon.setSize("100%", "80px");

		layout.addMember(ribbon);
		layout.addMember(mapWidget);
		return layout;
	}
713884
View getTargetView() {
    View view = screenshotTarget;
    if (!screenshotChildrenOnly) {
      while (view.getRootView() != view) {
        view = view.getRootView();
      }
    }

    return view;
  }
1225205
@Override
    public Viewport getViewport()
    {
        final Node<?> parent = getParent();// change, no iteration, no testing, no casting, recurses upwards to a Viewport, and Viewport returns itself, CYCLES!!!

        if (null != parent)
        {
            return parent.getViewport();
        }
        return null;
    }