Lua API
  • ๐Ÿ”ŽOverview
  • Introduction
    • ๐Ÿš€Creating scripts
      • ๐Ÿง First Steps
      • ๐Ÿ–ฅ๏ธAdding UI
      • ๐Ÿ“šCreating Libraries
  • API
    • ๐ŸŒGlobal Functions
    • โš™๏ธInstances
      • ๐Ÿ”ขMath
      • โ˜Ž๏ธEvents
        • event_t
      • ๐ŸŽฎGame
        • global_vars_t
        • cengine_client
          • cnet_chan
        • ccsgo_input
        • cinput_system
        • cgame_ui_funcs
        • ccvar
          • convar
      • ๐Ÿ•น๏ธMods
        • events_t
      • โœ๏ธDraw
        • โš™๏ธTypes
          • โš™๏ธrect
          • โš™๏ธvec2
          • โš™๏ธcolor
          • โš™๏ธaccessor
        • ๐Ÿ–ฅ๏ธAdapter
        • โœ๏ธLayer
          • outline_mode
          • rounding
          • glow_parts
          • text_params
            • text_alignment
          • shadow_dir
          • command
            • render_mode
        • ๐Ÿ–ผ๏ธManaged
          • ๐Ÿ–ผ๏ธtexture
            • svg_texture
            • animated_texture
          • ๐Ÿ–ผ๏ธshader
          • โ„ข๏ธfont_base
            • font
            • font_gdi
            • glyph_t
            • font_flags
      • ๐Ÿ™‹Entities
        • entity_list_t
          • entity_entry_t
        • base_entity
          • schema_accessor_t
          • cs2_weapon_base_gun
          • cs2_player_pawn
          • cs2_player_controller
          • cs2_weapon_base
          • cs2_grenade_projectile
        • ccsweapon_base_vdata
          • cfiring_mode
        • chandle
        • csweapon_mode
        • csweapon_type
        • weapon_id
        • csweapon_category
        • observer_mode_t
      • ๐Ÿ–ฅ๏ธGui
        • โš™๏ธTypes
          • โš™๏ธbits
          • โš™๏ธcontrol_id
        • context
          • user_t
        • context_input
          • mouse_button
        • notification_system
          • notification
        • control
          • control_type
          • value_param
          • checkbox
          • slider
          • label
          • selectable
          • button
          • color_picker
          • spacer
          • text_input
          • combo_box
          • image
        • container
          • control_container
            • layout
            • group
      • โš™๏ธUtils
    • โš™๏ธTypes
      • โš™๏ธptr
      • โš™๏ธref_holder_t
      • โš™๏ธvector
      • โš™๏ธvector4d
      • ๐ŸŽฎveccolor
      • ๐ŸŽฎcolor
      • ๐ŸŽฎcview_setup
      • ๐ŸŽฎcuser_cmd
      • ๐ŸŽฎgame_event_t
    • ๐ŸŸฐEnums
      • ๐ŸŸฐclient_frame_stage
      • ๐ŸŸฐinput_bit_mask
Powered by GitBook

ยฉ 2025 - FATALITY

On this page
Export as PDF
  1. API
  2. Instances
  3. Draw
  4. Managed
  5. texture

svg_texture

PrevioustextureNextanimated_texture

Last updated 3 months ago

This type represents an SVG texture object.

This type inherits type. All of its base methods and fields are also available in this type.

Passing invalid SVG data to the constructor will cause a crash. We will fix this issue in future updates.

__call๏ปฟ

Constructs an SVG texture.

Arguments

Name

Type

Description

sv

string

SVG text.

h

float

Target height. Defaults to 0, and 0 means that there will be no automatic downscale.

Returns

Type

Description

svg_texture

SVG texture object.

Example

local lightning = draw.svg_texture([[
<svg width="800px" height="800px" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9.55563 13.3232L9.43584 13.3123C7.90803 13.1735 7.14412 13.104 6.90146 12.5814C6.65881 12.0588 7.09869 11.4304 7.97846 10.1736L11.5612 5.05544C12.1424 4.22517 12.433 3.81003 12.6836 3.89831C12.9342 3.98658 12.9005 4.4922 12.8331 5.50343L12.6299 8.55194C12.5685 9.47214 12.5379 9.93224 12.8023 10.2419C13.0667 10.5515 13.5259 10.5933 14.4444 10.6768L14.5642 10.6877C16.092 10.8265 16.8559 10.896 17.0985 11.4186C17.3412 11.9412 16.9013 12.5696 16.0215 13.8264L12.4388 18.9446C11.8576 19.7748 11.567 20.19 11.3164 20.1017C11.0658 20.0134 11.0995 19.5078 11.1669 18.4966L11.3701 15.4481C11.4315 14.5279 11.4621 14.0678 11.1977 13.7581C10.9333 13.4485 10.4741 13.4067 9.55563 13.3232Z" fill="#ffffff"/>
<path d="M18.5 4L17 6H19L17.5 8" stroke="#ffffff" stroke-opacity="0.6" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M6.5 16L5 18H7L5.5 20" stroke="#ffffff" stroke-opacity="0.6" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
]], 24);
โš™๏ธ
โœ๏ธ
๐Ÿ–ผ๏ธ
๐Ÿ–ผ๏ธ
texture