1

I've been trying to identify and change some shape's gradient colors with the Google Slides API using the PHP library.

I checked the update requests and the API explorer and haven't been able to find a method for updating a gradient (like we can update a solid background).

I found colorStop in the API documentation in the "Other" section and in the PHP library but as you can see in the example below, the Google_Service_Slides_ShapeBackgroundFill property doesn't have any children appended, unlike basic RGB or theme backgrounds.

At this point I'm wondering if it's possible at all.

Here very basic example of what the dumped object looks like:

+"shape": Google_Service_Slides_Shape^ {#2625
      #placeholderType: "Google_Service_Slides_Placeholder"
      #placeholderDataType: ""
      #shapePropertiesType: "Google_Service_Slides_ShapeProperties"
      #shapePropertiesDataType: ""
      +shapeType: "RECTANGLE"
      #textType: "Google_Service_Slides_TextContent"
      #textDataType: ""
      #internal_gapi_mappings: []
      #modelData: []
      #processed: []
      +"shapeProperties": Google_Service_Slides_ShapeProperties^ {#2626
        +contentAlignment: "MIDDLE"
        #linkType: "Google_Service_Slides_Link"
        #linkDataType: ""
        #outlineType: "Google_Service_Slides_Outline"
        #outlineDataType: ""
        #shadowType: "Google_Service_Slides_Shadow"
        #shadowDataType: ""
        #shapeBackgroundFillType: "Google_Service_Slides_ShapeBackgroundFill"
        #shapeBackgroundFillDataType: ""
        #internal_gapi_mappings: []
        #modelData: []
        #processed: []
        //this should probably have a solidFill property
        +"shapeBackgroundFill": Google_Service_Slides_ShapeBackgroundFill^ {#2627
          +propertyState: null
          #solidFillType: "Google_Service_Slides_SolidFill"
          #solidFillDataType: ""
          #internal_gapi_mappings: []
          #modelData: []
          #processed: []
        }
       (...)
  • Does this answer your question? [How can we fill linear gradient color in google slide by api?](https://stackoverflow.com/questions/59406800/how-can-we-fill-linear-gradient-color-in-google-slide-by-api) – Jescanellas Jan 22 '20 at 11:33
  • Yes, unfortunately. Looks like its not posibble at the moment. – Jon Sanchez Jan 22 '20 at 14:28

0 Answers0