From b6b36543ceb8d3e7dc9cb5e2b5d5181795eb625e Mon Sep 17 00:00:00 2001 From: wiredfool Date: Sat, 12 Jul 2014 09:52:04 -0700 Subject: [PATCH] Autodoc formatting --- PIL/ImageMorph.py | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/PIL/ImageMorph.py b/PIL/ImageMorph.py index b24dd134f..3f15621a6 100644 --- a/PIL/ImageMorph.py +++ b/PIL/ImageMorph.py @@ -15,19 +15,19 @@ LUT_SIZE = 1 << 9 class LutBuilder: """A class for building a MorphLut from a descriptive language - The input patterns is a list of a strings sequences like these: + The input patterns is a list of a strings sequences like these:: - 4:(... - .1. - 111)->1 + 4:(... + .1. + 111)->1 (whitespaces including linebreaks are ignored). The option 4 describes a series of symmetry operations (in this case a 4-rotation), the pattern is described by: - . or X - Ignore - 1 - Pixel is on - 0 - Pixel is off + - . or X - Ignore + - 1 - Pixel is on + - 0 - Pixel is off The result of the operation is described after "->" string. @@ -35,15 +35,16 @@ class LutBuilder: returned if no other match is found. Operations: - 4 - 4 way rotation - N - Negate - 1 - Dummy op for no other operation (an op must always be given) - M - Mirroring + + - 4 - 4 way rotation + - N - Negate + - 1 - Dummy op for no other operation (an op must always be given) + - M - Mirroring - Example: - - lb = LutBuilder(patterns = ["4:(... .1. 111)->1"]) - lut = lb.build_lut() + Example:: + + lb = LutBuilder(patterns = ["4:(... .1. 111)->1"]) + lut = lb.build_lut() """ def __init__(self, patterns=None, op_name=None):