mirror of
https://github.com/jsvine/pdfplumber.git
synced 2026-08-29 08:34:23 +08:00
Update README.md and example re. pts/points (#856)
Update ag-energy-roundup-curves.ipynb Update the key name 'point' to 'pts' in the example to the latest version * 💄 * Update ag-energy-roundup-curves.ipynb 💄
This commit is contained in:
@@ -214,7 +214,7 @@ my_char_rotation = my_char_ctm.skew_x
|
||||
| Property | Description |
|
||||
|----------|-------------|
|
||||
|`page_number`| Page number on which this curve was found.|
|
||||
|`points`| Points — as a list of `(x, top)` tuples — describing the curve.|
|
||||
|`pts`| Points — as a list of `(x, top)` tuples — describing the curve.|
|
||||
|`height`| Height of curve's bounding box.|
|
||||
|`width`| Width of curve's bounding box.|
|
||||
|`x0`| Distance of curve's left-most point from left side of page.|
|
||||
|
||||
@@ -168,14 +168,6 @@
|
||||
" 'non_stroking_color': 1,\n",
|
||||
" 'object_type': 'curve',\n",
|
||||
" 'page_number': 1,\n",
|
||||
" 'points': [(585.31, 139.44),\n",
|
||||
" (588.48, 143.16000000000003),\n",
|
||||
" (591.72, 143.88),\n",
|
||||
" (594.84, 149.69),\n",
|
||||
" (598.08, 145.2),\n",
|
||||
" (601.32, 139.13),\n",
|
||||
" (604.44, 141.12),\n",
|
||||
" (607.67, 142.56)],\n",
|
||||
" 'top': 139.13,\n",
|
||||
" 'bottom': 149.69,\n",
|
||||
" 'doctop': 139.13}"
|
||||
@@ -263,8 +255,8 @@
|
||||
"colors = [ \"red\", \"blue\", \"green\" ]\n",
|
||||
"for i, curve in enumerate(report.curves):\n",
|
||||
" stroke = colors[i%len(colors)]\n",
|
||||
" im.draw_circles(curve[\"points\"], radius=3, stroke=stroke, fill=\"white\")\n",
|
||||
" im.draw_line(curve[\"points\"], stroke=stroke, stroke_width=2)\n",
|
||||
" im.draw_circles(curve[\"pts\"], radius=3, stroke=stroke, fill=\"white\")\n",
|
||||
" im.draw_line(curve[\"pts\"], stroke=stroke, stroke_width=2)\n",
|
||||
"im"
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user