path_texture.cpp 916 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #include "path_texture.h"
  2. void PathTexture::set_begin_texture(const Ref<Texture>& p_texture) {
  3. begin=p_texture;
  4. update();
  5. }
  6. Ref<Texture> PathTexture::get_begin_texture() const{
  7. return begin;
  8. }
  9. void PathTexture::set_repeat_texture(const Ref<Texture>& p_texture){
  10. repeat=p_texture;
  11. update();
  12. }
  13. Ref<Texture> PathTexture::get_repeat_texture() const{
  14. return repeat;
  15. }
  16. void PathTexture::set_end_texture(const Ref<Texture>& p_texture){
  17. end=p_texture;
  18. update();
  19. }
  20. Ref<Texture> PathTexture::get_end_texture() const{
  21. return end;
  22. }
  23. void PathTexture::set_subdivisions(int p_amount){
  24. ERR_FAIL_INDEX(p_amount,32);
  25. subdivs=p_amount;
  26. update();
  27. }
  28. int PathTexture::get_subdivisions() const{
  29. return subdivs;
  30. }
  31. void PathTexture::set_overlap(int p_amount){
  32. overlap=p_amount;
  33. update();
  34. }
  35. int PathTexture::get_overlap() const{
  36. return overlap;
  37. }
  38. PathTexture::PathTexture() {
  39. overlap=0;
  40. subdivs=1;
  41. }