Method: Processing::GraphicsContext#shearX

Defined in:
lib/processing/graphics_context.rb

#shearX(angle) ⇒ nil

Applies shear around the x-axis.

Parameters:

  • angle (Numeric)

    angle for shearing

Returns:

  • (nil)

    nil

See Also:



2262
2263
2264
2265
2266
2267
2268
2269
2270
# File 'lib/processing/graphics_context.rb', line 2262

def shearX(angle)
  t = Math.tan toRadians__(angle)
  @painter__.matrix *= Rays::Matrix.new(
    1, t, 0, 0,
    0, 1, 0, 0,
    0, 0, 1, 0,
    0, 0, 0, 1)
  nil
end