A region classifier specifies the format and location for an object. A
classifier might be a 2-dimensional rectangle for an image, a line of text in a
document, a time duration in a video, and so on. To define a region, select the
region classifier that matches the type of content you're trying to use. For
example, if your content is text, you're likely going to use either the txt
or line region classifier. To see an example of a region classifier, see
Manage comments and
replies.
The following is a list of the region classifiers included with the Google Drive API:
rectA rectangle in a 2-dimensional image.
Property Description Type xPosition on the x axis, units default to pixels for images and percent for PDFs. Double yPosition on the y axis, units default to pixels for images and percent for PDFs. Double wLength on the x axis, units default to pixels for images and percent for PDFs. Double hLength on the y axis, units default to pixels for images and percent for PDFs. Double mwThe full width of the document when the comment was made. Use this to make xandwunitless since they can act like a percentage.Double mhThe full height of the document when the comment was made. See mwabove for purpose.Double rThe degrees of rotation of the document. For example, if an image is rotated 90 degrees clockwise then a rectangle at 0,0 displays in the top right of the image. Should be one of 0, 90, 180, 270. Double pageA page number in a PDF, TIFF, or other document with pages. Use this for documents with page-like elements (such as a spreadsheet, slide, or layer).
Property Description Type pThe page number (0-indexed). Integer mpThe number of pages in this document. Integer timeA duration of time in a video or other document with a time dimension.
Property Description Type tThe start time. hh:MM:ss.fracformatted time string (where M = minutes, m = millis; hours and minutes are optional)dThe duration of the time range. hh:MM:ss:mmmformatted time string (where M = minutes, m = millis)mdThe full-time duration of the document. hh:MM:ss:mmmformatted time string (where M = minutes, m = millis)txtA range of text in a document.
Property Description Type oStart offset (character offset from the start of the file). Integer lThe length of the text range. Integer mlThe length of this document in characters. Integer lineA specific line in a text file or any files with lines in it.
Property Description Type nLine number. Integer lThe length of the line range. Integer mlThe maximum number of lines in the file. Integer matrixA location in a matrix-like structure. Used to define rows and columns in spreadsheet documents, or any other documents that have a row or column structure.
Property Description Type cThe column number. Integer rThe row number. Integer wThe number of columns. Integer hThe number of rows. Integer mwThe maximum width. Integer mhThe maximum height. Integer