Sha256: b6caa22d794872d3f4e8f89cd4306ad79b73b911b1a7d4eb53c32ee927946198

Contents?: true

Size: 556 Bytes

Versions: 4

Compression:

Stored size: 556 Bytes

Contents

# frozen_string_literal: true

module DrawioDsl
  module Schema
    # Text represents text shapes such as h1, h2, p, etc.
    class Text < Shape
      class << self
        def configure_as(key)
          configure_shape(key, :text)
        end
      end

      def apply_defaults(args)
        super(args)

        @fill_color       = args[:fill_color]
        @stroke_color     = args[:stroke_color]
        @gradient         = args[:gradient]
        @font_color       = args[:font_color] || page.bg_theme_palette.font_color
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
drawio_dsl-0.11.1 lib/drawio_dsl/schema/text.rb
drawio_dsl-0.11.0 lib/drawio_dsl/schema/text.rb
drawio_dsl-0.10.1 lib/drawio_dsl/schema/text.rb
drawio_dsl-0.10.0 lib/drawio_dsl/schema/text.rb