element_fespecularlighting.erl 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. -module(element_fespecularlighting).
  2. -author('Konstantin Zakablukovsky').
  3. -include("nitro.hrl").
  4. -compile(export_all).
  5. render_element(Record) ->
  6. wf_tags:emit_tag(<<"feSpecularLighting">>, nitro:render(Record#feSpecularLighting.body),
  7. lists:append([
  8. [
  9. {<<"id">>, Record#feSpecularLighting.id},
  10. {<<"class">>, Record#feSpecularLighting.class},
  11. {<<"style">>, Record#feSpecularLighting.style},
  12. {<<"in">>, Record#feSpecularLighting.in},
  13. {<<"surfaceScale">>, Record#feSpecularLighting.surfaceScale},
  14. {<<"specularConstant">>, Record#feSpecularLighting.specularConstant},
  15. {<<"specularExponent">>, Record#feSpecularLighting.specularExponent},
  16. {<<"kernelUnitLength">>, Record#feSpecularLighting.kernelUnitLength}
  17. ],
  18. svg_core(Record),
  19. svg_filter_primitive(Record),
  20. svg_presentation(Record),
  21. Record#feSpecularLighting.data_fields,
  22. Record#feSpecularLighting.aria_states
  23. ])).
  24. %% Common SVG attributes
  25. svg_core(Record)-> [
  26. {<<"xml:base">>, Record#feSpecularLighting.xmlbase},
  27. {<<"xml:lang">>, Record#feSpecularLighting.xmllang},
  28. {<<"xml:space">>, Record#feSpecularLighting.xmlspace}
  29. ].
  30. svg_filter_primitive(Record)-> [
  31. {<<"height">>, Record#feSpecularLighting.height},
  32. {<<"result">>, Record#feSpecularLighting.result},
  33. {<<"width">>, Record#feSpecularLighting.width},
  34. {<<"x">>, Record#feSpecularLighting.x},
  35. {<<"y">>, Record#feSpecularLighting.y}
  36. ].
  37. svg_presentation(Record)-> [
  38. {<<"alignment-baseline">>, Record#feSpecularLighting.alignment_baseline},
  39. {<<"baseline-shift">>, Record#feSpecularLighting.baseline_shift},
  40. {<<"clip">>, Record#feSpecularLighting.clip},
  41. {<<"clip-path">>, Record#feSpecularLighting.clip_path},
  42. {<<"clip-rule">>, Record#feSpecularLighting.clip_rule},
  43. {<<"color">>, Record#feSpecularLighting.color},
  44. {<<"color-interpolation">>, Record#feSpecularLighting.color_interpolation},
  45. {<<"color-interpolation-filters">>, Record#feSpecularLighting.color_interpolation_filters},
  46. {<<"color-profile">>, Record#feSpecularLighting.color_profile},
  47. {<<"color-rendering">>, Record#feSpecularLighting.color_rendering},
  48. {<<"cursor">>, Record#feSpecularLighting.cursor},
  49. {<<"direction">>, Record#feSpecularLighting.direction},
  50. {<<"display">>, Record#feSpecularLighting.display},
  51. {<<"dominant-baseline">>, Record#feSpecularLighting.dominant_baseline},
  52. {<<"enable-background">>, Record#feSpecularLighting.enable_background},
  53. {<<"fill">>, Record#feSpecularLighting.fill},
  54. {<<"fill-opacity">>, Record#feSpecularLighting.fill_opacity},
  55. {<<"fill-rule">>, Record#feSpecularLighting.fill_rule},
  56. {<<"filter">>, Record#feSpecularLighting.filter},
  57. {<<"flood-color">>, Record#feSpecularLighting.flood_color},
  58. {<<"flood-opacity">>, Record#feSpecularLighting.flood_opacity},
  59. {<<"font-family">>, Record#feSpecularLighting.font_family},
  60. {<<"font-size">>, Record#feSpecularLighting.font_size},
  61. {<<"font-size-adjust">>, Record#feSpecularLighting.font_size_adjust},
  62. {<<"font-stretch">>, Record#feSpecularLighting.font_stretch},
  63. {<<"font-style">>, Record#feSpecularLighting.font_style},
  64. {<<"font-variant">>, Record#feSpecularLighting.font_variant},
  65. {<<"font-weight">>, Record#feSpecularLighting.font_weight},
  66. {<<"glyph-orientation-horizontal">>, Record#feSpecularLighting.glyph_orientation_horizontal},
  67. {<<"glyph-orientation-vertical">>, Record#feSpecularLighting.glyph_orientation_vertical},
  68. {<<"image-rendering">>, Record#feSpecularLighting.image_rendering},
  69. {<<"kerning">>, Record#feSpecularLighting.kerning},
  70. {<<"letter-spacing">>, Record#feSpecularLighting.letter_spacing},
  71. {<<"lighting-color">>, Record#feSpecularLighting.lighting_color},
  72. {<<"marker-end">>, Record#feSpecularLighting.marker_end},
  73. {<<"marker-mid">>, Record#feSpecularLighting.marker_mid},
  74. {<<"marker-start">>, Record#feSpecularLighting.marker_start},
  75. {<<"mask">>, Record#feSpecularLighting.mask},
  76. {<<"opacity">>, Record#feSpecularLighting.opacity},
  77. {<<"overflow">>, Record#feSpecularLighting.overflow},
  78. {<<"pointer-events">>, Record#feSpecularLighting.pointer_events},
  79. {<<"shape-rendering">>, Record#feSpecularLighting.shape_rendering},
  80. {<<"stop-color">>, Record#feSpecularLighting.stop_color},
  81. {<<"stop-opacity">>, Record#feSpecularLighting.stop_opacity},
  82. {<<"stroke">>, Record#feSpecularLighting.stroke},
  83. {<<"stroke-dasharray">>, Record#feSpecularLighting.stroke_dasharray},
  84. {<<"stroke-dashoffset">>, Record#feSpecularLighting.stroke_dashoffset},
  85. {<<"stroke-linecap">>, Record#feSpecularLighting.stroke_linecap},
  86. {<<"stroke-linejoin">>, Record#feSpecularLighting.stroke_linejoin},
  87. {<<"stroke-miterlimit">>, Record#feSpecularLighting.stroke_miterlimit},
  88. {<<"stroke-opacity">>, Record#feSpecularLighting.stroke_opacity},
  89. {<<"stroke-width">>, Record#feSpecularLighting.stroke_width},
  90. {<<"text-anchor">>, Record#feSpecularLighting.text_anchor},
  91. {<<"text-decoration">>, Record#feSpecularLighting.text_decoration},
  92. {<<"text-rendering">>, Record#feSpecularLighting.text_rendering},
  93. {<<"unicode-bidi">>, Record#feSpecularLighting.unicode_bidi},
  94. {<<"visibility">>, Record#feSpecularLighting.visibility},
  95. {<<"word-spacing">>, Record#feSpecularLighting.word_spacing},
  96. {<<"writing-mode">>, Record#feSpecularLighting.writing_mode}
  97. ].