0
The <a href="Base.html">Operator::Base</a> class is what all other <a
0
href="../Operator.html">Operator</a> classes inherit from. To write your
0
own <a href="../Operator.html">Operator</a> class, simply inherit from this
0
-class, and implement your own <a href="Base.html#M00001
8">operate</a>
0
+class, and implement your own <a href="Base.html#M00001
7">operate</a>
0
methods, with your own arguments. Just return a new RMagick image object
0
that represents the new image, and the model will be updated automatically.
0
You have access to a few instance variables in the <a
0
-href="Base.html#M00001
8">operate</a> method:
0
+href="Base.html#M00001
7">operate</a> method:
0
<li>@image : The current image from the model. Use this is a starting point for
0
@@ -111,12 +111,12 @@ methods if you need to do something specific based on model data.
0
<h3 class="section-bar">Methods</h3>
0
<div class="name-list">
0
- <a href="#M000018">operate</a>
0
- <a href="#M000020">scale</a>
0
- <a href="#M000021">scale_and_crop</a>
0
- <a href="#M000019">size_to_xy</a>
0
- <a href="#M000022">stretch</a>
0
- <a href="#M000023">symbol_to_blending_mode</a>
0
+ <a href="#M000017">operate</a>
0
+ <a href="#M000019">scale</a>
0
+ <a href="#M000020">scale_and_crop</a>
0
+ <a href="#M000018">size_to_xy</a>
0
+ <a href="#M000021">stretch</a>
0
+ <a href="#M000022">symbol_to_blending_mode</a>
0
@@ -138,11 +138,11 @@ methods if you need to do something specific based on model data.
0
<h3 class="section-bar">Public Instance methods</h3>
0
- <div id="method-M000018" class="method-detail">
0
- <a name="M000018"></a>
0
+ <div id="method-M000017" class="method-detail">
0
+ <a name="M000017"></a>
0
<div class="method-heading">
0
- <a href="#M00001
8" class="method-signature">
0
+ <a href="#M00001
7" class="method-signature">
0
<span class="method-name">operate</span><span class="method-args">(*args)</span>
0
@@ -154,8 +154,8 @@ href="Base.html">Operator::Base</a> subclasses in order to write your own
0
<p><a class="source-toggle" href="#"
0
- onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
0
- <div class="method-source-code" id="M000018-source">
0
+ onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
0
+ <div class="method-source-code" id="M000017-source">
0
<span class="ruby-comment cmt"># File lib/fleximage/operator/base.rb, line 31</span>
0
31: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">operate</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
0
@@ -166,11 +166,11 @@ image operators.
0
- <div id="method-M000020" class="method-detail">
0
- <a name="M000020"></a>
0
+ <div id="method-M000019" class="method-detail">
0
+ <a name="M000019"></a>
0
<div class="method-heading">
0
- <a href="#M0000
20" class="method-signature">
0
+ <a href="#M0000
19" class="method-signature">
0
<span class="method-name">scale</span><span class="method-args">(size, img = nil)</span>
0
@@ -179,11 +179,11 @@ image operators.
0
Scale the image, respecting aspect ratio. Operation will happen in the main
0
<tt>@image</tt> unless you supply the <tt>img</tt> argument to <a
0
-href="Base.html#M00001
8">operate</a> on instead.
0
+href="Base.html#M00001
7">operate</a> on instead.
0
<p><a class="source-toggle" href="#"
0
- onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
0
- <div class="method-source-code" id="M000020-source">
0
+ onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
0
+ <div class="method-source-code" id="M000019-source">
0
<span class="ruby-comment cmt"># File lib/fleximage/operator/base.rb, line 62</span>
0
62: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scale</span>(<span class="ruby-identifier">size</span>, <span class="ruby-identifier">img</span> = <span class="ruby-keyword kw">nil</span>)
0
@@ -198,11 +198,11 @@ href="Base.html#M000018">operate</a> on instead.
0
- <div id="method-M000021" class="method-detail">
0
- <a name="M000021"></a>
0
+ <div id="method-M000020" class="method-detail">
0
+ <a name="M000020"></a>
0
<div class="method-heading">
0
- <a href="#M00002
1" class="method-signature">
0
+ <a href="#M00002
0" class="method-signature">
0
<span class="method-name">scale_and_crop</span><span class="method-args">(size, img = nil)</span>
0
@@ -211,12 +211,12 @@ href="Base.html#M000018">operate</a> on instead.
0
Scale to the desired size and crop edges off to get the exact dimensions
0
needed. Operation will happen in the main <tt>@image</tt> unless you supply
0
-the <tt>img</tt> argument to <a href="Base.html#M00001
8">operate</a> on
0
+the <tt>img</tt> argument to <a href="Base.html#M00001
7">operate</a> on
0
<p><a class="source-toggle" href="#"
0
- onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
0
- <div class="method-source-code" id="M000021-source">
0
+ onclick="toggleCode('M000020-source');return false;">[Source]</a></p>
0
+ <div class="method-source-code" id="M000020-source">
0
<span class="ruby-comment cmt"># File lib/fleximage/operator/base.rb, line 73</span>
0
73: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scale_and_crop</span>(<span class="ruby-identifier">size</span>, <span class="ruby-identifier">img</span> = <span class="ruby-keyword kw">nil</span>)
0
@@ -227,11 +227,11 @@ instead.
0
- <div id="method-M000019" class="method-detail">
0
- <a name="M000019"></a>
0
+ <div id="method-M000018" class="method-detail">
0
+ <a name="M000018"></a>
0
<div class="method-heading">
0
- <a href="#M00001
9" class="method-signature">
0
+ <a href="#M00001
8" class="method-signature">
0
<span class="method-name">size_to_xy</span><span class="method-args">(size)</span>
0
@@ -261,8 +261,8 @@ Usage:
0
x, y = size_to_xy("10x20")
0
<p><a class="source-toggle" href="#"
0
- onclick="toggleCode('M000019-source');return false;">[Source]</a></p>
0
- <div class="method-source-code" id="M000019-source">
0
+ onclick="toggleCode('M000018-source');return false;">[Source]</a></p>
0
+ <div class="method-source-code" id="M000018-source">
0
<span class="ruby-comment cmt"># File lib/fleximage/operator/base.rb, line 49</span>
0
49: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">size_to_xy</span>(<span class="ruby-identifier">size</span>)
0
@@ -279,11 +279,11 @@ Usage:
0
- <div id="method-M000022" class="method-detail">
0
- <a name="M000022"></a>
0
+ <div id="method-M000021" class="method-detail">
0
+ <a name="M000021"></a>
0
<div class="method-heading">
0
- <a href="#M00002
2" class="method-signature">
0
+ <a href="#M00002
1" class="method-signature">
0
<span class="method-name">stretch</span><span class="method-args">(size, img = nil)</span>
0
@@ -292,12 +292,12 @@ Usage:
0
<a href="Resize.html">Resize</a> the image, with no respect to aspect
0
ratio. Operation will happen in the main <tt>@image</tt> unless you supply
0
-the <tt>img</tt> argument to <a href="Base.html#M00001
8">operate</a> on
0
+the <tt>img</tt> argument to <a href="Base.html#M00001
7">operate</a> on
0
<p><a class="source-toggle" href="#"
0
- onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
0
- <div class="method-source-code" id="M000022-source">
0
+ onclick="toggleCode('M000021-source');return false;">[Source]</a></p>
0
+ <div class="method-source-code" id="M000021-source">
0
<span class="ruby-comment cmt"># File lib/fleximage/operator/base.rb, line 80</span>
0
80: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stretch</span>(<span class="ruby-identifier">size</span>, <span class="ruby-identifier">img</span> = <span class="ruby-keyword kw">nil</span>)
0
@@ -308,11 +308,11 @@ instead.
0
- <div id="method-M000023" class="method-detail">
0
- <a name="M000023"></a>
0
+ <div id="method-M000022" class="method-detail">
0
+ <a name="M000022"></a>
0
<div class="method-heading">
0
- <a href="#M00002
3" class="method-signature">
0
+ <a href="#M00002
2" class="method-signature">
0
<span class="method-name">symbol_to_blending_mode</span><span class="method-args">(mode)</span>
0
@@ -333,8 +333,8 @@ To use a blend mode remove the <tt>CompositeOp</tt> form the name and
0
<tt>CopyBlackCompositeOp</tt> becomes :<tt>copy_black</tt>.
0
<p><a class="source-toggle" href="#"
0
- onclick="toggleCode('M000023-source');return false;">[Source]</a></p>
0
- <div class="method-source-code" id="M000023-source">
0
+ onclick="toggleCode('M000022-source');return false;">[Source]</a></p>
0
+ <div class="method-source-code" id="M000022-source">
0
<span class="ruby-comment cmt"># File lib/fleximage/operator/base.rb, line 91</span>
0
91: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">symbol_to_blending_mode</span>(<span class="ruby-identifier">mode</span>)