CN111192336A - Method and terminal for restoring linear gradual change of background title shadows in PPTX - Google Patents

Method and terminal for restoring linear gradual change of background title shadows in PPTX Download PDF

Info

Publication number
CN111192336A
CN111192336A CN201911321691.4A CN201911321691A CN111192336A CN 111192336 A CN111192336 A CN 111192336A CN 201911321691 A CN201911321691 A CN 201911321691A CN 111192336 A CN111192336 A CN 111192336A
Authority
CN
China
Prior art keywords
title
slide
background
page number
pptx
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911321691.4A
Other languages
Chinese (zh)
Other versions
CN111192336B (en
Inventor
刘德建
林严
郭玉湖
陈宏�
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Tianquan Educational Technology Ltd
Original Assignee
Fujian Tianquan Educational Technology Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Tianquan Educational Technology Ltd filed Critical Fujian Tianquan Educational Technology Ltd
Priority to CN201911321691.4A priority Critical patent/CN111192336B/en
Publication of CN111192336A publication Critical patent/CN111192336A/en
Application granted granted Critical
Publication of CN111192336B publication Critical patent/CN111192336B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a method and a terminal for restoring linear gradual change of background title shadows in PPTX, which are used for reading an XML file in a PPTX compression format file; traversing the node content in the XML file, and determining a slide set by a background title shadow linear gradual change effect; analyzing the page number of the slide, the gradient color information of the title corresponding to the page number and the position of the title according to the slide set by the background title shadow linear gradient effect; and generating a background picture with the same background title shadow linear gradient effect as the background picture corresponding to the slide according to the page number of the slide, the gradient color information of the title corresponding to the slide and the position of the title, effectively solving the problem that the background title shadow linear gradient effect picture of the slide in the PPTX file can be derived under the condition that a PowerPoint program cannot be used, and realizing accurate reduction of the background title shadow linear gradient effect of the slide in the PPTX file.

Description

Method and terminal for restoring linear gradual change of background title shadows in PPTX
Technical Field
The invention relates to the field of image processing, in particular to a method and a terminal for restoring linear gradual change of background title shadows in PPTX.
Background
The method for analyzing title shade linear gradient effect of slide background picture in PPTX file is that PPTX file is imported into PowerPoint, mouse selects target background picture, right button is clicked, background format is selected, setting parameter of title shade linear gradient effect in target background picture is checked, and restoring of title shade linear gradient effect is carried out by drawing library according to the parameter, however, the method needs to rely on PowerPoint to check effect setting parameter, and when a large amount of title shade linear gradient effect in background picture needs to be restored at the same time, checking setting parameter of background picture one by one in PowerPoint also consumes a large amount of time, and when the title shade linear gradient effect of background picture in slide needs to be restored and application scene of PowerPoint can not be used, the method can not process data due to effect of background picture, and the title shade linear gradual change effect of the background picture cannot be accurately restored.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the method and the terminal for restoring the linear gradual change of the background title shadow in the PPTX file can accurately and effectively analyze the linear gradual change effect of the background title shadow in the PPTX file and generate a background picture with the same effect.
In order to solve the technical problems, the invention adopts the technical scheme that:
a method for restoring linear gradual change of background title shadows in PPTX comprises the following steps:
s1, reading an XML file in the PPTX compression format file;
s2, traversing the node content in the XML file, and determining a slide set by the background title shadow linear gradual effect;
s3, analyzing the page number of the slide, the gradient color information of the corresponding title and the position of the title according to the slide set by the background title shadow linear gradient effect;
and S4, generating a background picture with the same background title shadow linear gradient effect according to the page number of the slide, the gradient color information of the title corresponding to the slide and the position of the title.
In order to solve the technical problem, the invention adopts another technical scheme as follows:
a terminal for restoring linear gradual background title shading in PPTX, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
s1, reading an XML file in the PPTX compression format file;
s2, traversing the node content in the XML file, and determining a slide set by the background title shadow linear gradual effect;
s3, analyzing the page number of the slide, the gradient color information of the corresponding title and the position of the title according to the slide set by the background title shadow linear gradient effect;
and S4, generating a background picture with the same background title shadow linear gradient effect according to the page number of the slide, the gradient color information of the title corresponding to the slide and the position of the title.
The invention has the beneficial effects that: reading an XML file in a PPTX compression format file, traversing node contents in the file, determining a slide set by a background title shadow linear gradual change effect, analyzing the page number of the slide, gradual change color information of a title corresponding to the page number and the position of the title, and generating a background picture with the same background title shadow linear gradual change effect as the background picture corresponding to the slide according to the data. By reading the node content of the XML file in the PPTX compressed format file, whether the slide in the PPTX file is set with the title shadow linear gradual change effect in the background format can be accurately judged, and a background picture with the same setting effect as the parameter can be generated by analyzing the parameter set by the background title shadow linear gradual change effect, so that the problem that the background title shadow linear gradual change effect picture of the slide in the PPTX file can be derived under the condition that a PowerPoint program cannot be used is effectively solved, and the accurate reduction of the background title shadow linear gradual change effect of the slide in the PPTX file is realized.
Drawings
FIG. 1 is a flowchart illustrating steps of a method for restoring a linear gradual background title shading in PPTX according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a terminal for restoring a linear gradual change of a background title shadow in PPTX according to an embodiment of the present invention;
fig. 3 is a schematic drawing diagram of gradual change of a method for restoring a linear gradual change of a background title shadow in PPTX according to an embodiment of the present invention;
description of reference numerals:
1. a terminal for restoring the linear gradual change of background title shadows in PPTX; 2. a memory; 3. a processor.
Detailed Description
In order to explain technical contents, achieved objects, and effects of the present invention in detail, the following description is made with reference to the accompanying drawings in combination with the embodiments.
Referring to fig. 1, a method for restoring a linear gradual change of a background title shadow in PPTX includes the steps of:
s1, reading an XML file in the PPTX compression format file;
s2, traversing the node content in the XML file, and determining a slide set by the background title shadow linear gradual effect;
s3, analyzing the page number of the slide, the gradient color information of the corresponding title and the position of the title according to the slide set by the background title shadow linear gradient effect;
and S4, generating a background picture with the same background title shadow linear gradient effect according to the page number of the slide, the gradient color information of the title corresponding to the slide and the position of the title.
As can be seen from the above description, the beneficial effects of the present invention are: reading an XML file in a PPTX compression format file, traversing node contents in the file, determining a slide set by a background title shadow linear gradual change effect, analyzing the page number of the slide, gradual change color information of a title corresponding to the page number and the position of the title, and generating a background picture with the same background title shadow linear gradual change effect as the background picture corresponding to the slide according to the data. By reading the node content of the XML file in the PPTX compressed format file, whether the slide in the PPTX file is set with the title shadow linear gradual change effect in the background format can be accurately judged, and a background picture with the same setting effect as the parameter can be generated by analyzing the parameter set by the background title shadow linear gradual change effect, so that the problem that the background title shadow linear gradual change effect picture of the slide in the PPTX file can be derived under the condition that a PowerPoint program cannot be used is effectively solved, and the accurate reduction of the background title shadow linear gradual change effect of the slide in the PPTX file is realized.
Further, the step S2 includes:
traversing all files representing slide page number contents in the XML file, respectively judging whether a node representing the setting of the background title shadow linear gradual change effect exists in each slide page number content file, if so, executing the step S3, and if not, not processing.
As can be seen from the above description, when analyzing the background title shadow linear gradual effect, traversal of a large number of files and nodes is involved, and therefore, it is determined whether a node indicating that the background title shadow linear gradual effect is set exists in the slide page content file, so that the analysis time of the background title shadow linear gradual effect in the PPTX file can be effectively saved, and the analysis efficiency is improved.
Further, the step S3 includes:
analyzing the child nodes under the nodes for representing the setting of the background title shadow linear gradient effect, and acquiring gradient color information of the title and position information of the title under the current slide;
and acquiring the page number of the current slide, and storing the page number of the slide, the gradient color information of the title corresponding to the page number of the slide and the position of the title in an array in a JSON data format.
It can be known from the above description that, because the background title shadow linear gradual effect relates to the gradual change of color, the gradual change color information of the title is obtained, the background title shadow linear gradual effect can be effectively restored by simulating the gradual change color, and at the same time, the background title shadow linear gradual effect of the slide is gradually changed by extending the title outwards, so the position information of the title is the necessary parameter for correctly restoring the background title shadow linear gradual effect, the page number of the current slide, the gradual change color information and the position information of the title are stored into the JSON array, the page number of the slide and the setting parameter of the background title shadow linear gradual effect in the slide are in one-to-one correspondence, which is beneficial to restoring the title effect in the slide in a targeted manner, avoiding confusion of the setting parameter of the background title shadow linear gradual effect, and in addition, the data is stored by using the JSON array, the data transmission is convenient, and the data structure is more visual.
Further, the step S4 includes:
and according to the page number of the transferred slide, the gradient color information of the title corresponding to the page number of the transferred slide and the position of the title, creating a canvas with the same proportion as the slide by using a linear gradient brush in a drawing library, performing gradient drawing of five areas, and generating a background picture with the same linear gradient effect as the background title shadow corresponding to the slide.
According to the description, the canvas with the same proportion as the slide is drawn through the drawing library, the size of the PPT background picture derived from PowerPoint can be simulated, the region is divided on the canvas for targeted gradual drawing, and the drawn background picture can accurately restore the linear gradual change effect of the background title shadow corresponding to the slide.
Further, the performing of the gradient drawing of the five regions in the step S4 includes:
and drawing the shapes of the five areas in the canvas by using functions of drawing polygons and drawing rectangles.
It can be known from the above description that, since the background title shadow linear gradual change regions in the slide are all regular geometric figures, the functions of drawing polygons and drawing rectangles are used to draw five regions in the canvas, so that the shape of the background title shadow linear gradual change regions in the slide can be effectively restored, and the accuracy of effect restoration is improved.
Referring to fig. 2, a terminal for restoring a linear gradual change of a background title shade in PPTX includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the following steps when executing the computer program:
s1, reading an XML file in the PPTX compression format file;
s2, traversing the node content in the XML file, and determining a slide set by the background title shadow linear gradual effect;
s3, analyzing the page number of the slide, the gradient color information of the corresponding title and the position of the title according to the slide set by the background title shadow linear gradient effect;
and S4, generating a background picture with the same background title shadow linear gradient effect according to the page number of the slide, the gradient color information of the title corresponding to the slide and the position of the title.
As can be seen from the above description, the beneficial effects of the present invention are: reading an XML file in a PPTX compression format file, traversing node contents in the file, determining a slide set by a background title shadow linear gradual change effect, analyzing the page number of the slide, gradual change color information of a title corresponding to the page number and the position of the title, and generating a background picture with the same background title shadow linear gradual change effect as the background picture corresponding to the slide according to the data. By reading the node content of the XML file in the PPTX compressed format file, whether the slide in the PPTX file is set with the title shadow linear gradual change effect in the background format can be accurately judged, and a background picture with the same setting effect as the parameter can be generated by analyzing the parameter set by the background title shadow linear gradual change effect, so that the problem that the background title shadow linear gradual change effect picture of the slide in the PPTX file can be derived under the condition that a PowerPoint program cannot be used is effectively solved, and the accurate reduction of the background title shadow linear gradual change effect of the slide in the PPTX file is realized.
Further, the step S2 includes:
traversing all files representing slide page number contents in the XML file, respectively judging whether a node representing the setting of the background title shadow linear gradual change effect exists in each slide page number content file, if so, executing the step S3, and if not, not processing.
As can be seen from the above description, when analyzing the background title shadow linear gradual effect, traversal of a large number of files and nodes is involved, and therefore, it is determined whether a node indicating that the background title shadow linear gradual effect is set exists in the slide page content file, so that the analysis time of the background title shadow linear gradual effect in the PPTX file can be effectively saved, and the analysis efficiency is improved.
Further, the step S3 includes:
analyzing the child nodes under the nodes for representing the setting of the background title shadow linear gradient effect, and acquiring gradient color information of the title and position information of the title under the current slide;
and acquiring the page number of the current slide, and storing the page number of the slide, the gradient color information of the title corresponding to the page number of the slide and the position of the title in an array in a JSON data format.
It can be known from the above description that, because the background title shadow linear gradual effect relates to the gradual change of color, the gradual change color information of the title is obtained, the background title shadow linear gradual effect can be effectively restored by simulating the gradual change color, and at the same time, the background title shadow linear gradual effect of the slide is gradually changed by extending the title outwards, so the position information of the title is the necessary parameter for correctly restoring the background title shadow linear gradual effect, the page number of the current slide, the gradual change color information and the position information of the title are stored into the JSON array, the page number of the slide and the setting parameter of the background title shadow linear gradual effect in the slide are in one-to-one correspondence, which is beneficial to restoring the title effect in the slide in a targeted manner, avoiding confusion of the setting parameter of the background title shadow linear gradual effect, and in addition, the data is stored by using the JSON array, the data transmission is convenient, and the data structure is more visual.
Further, the step S4 includes:
and according to the page number of the transferred slide, the gradient color information of the title corresponding to the page number of the transferred slide and the position of the title, creating a canvas with the same proportion as the slide by using a linear gradient brush in a drawing library, performing gradient drawing of five areas, and generating a background picture with the same linear gradient effect as the background title shadow corresponding to the slide.
According to the description, the canvas with the same proportion as the slide is drawn through the drawing library, the size of the PPT background picture derived from PowerPoint can be simulated, the region is divided on the canvas for targeted gradual drawing, and the drawn background picture can accurately restore the linear gradual change effect of the background title shadow corresponding to the slide.
Further, the performing of the gradient drawing of the five regions in the step S4 includes:
and drawing the shapes of the five areas in the canvas by using functions of drawing polygons and drawing rectangles.
It can be known from the above description that, since the background title shadow linear gradual change regions in the slide are all regular geometric figures, the functions of drawing polygons and drawing rectangles are used to draw five regions in the canvas, so that the shape of the background title shadow linear gradual change regions in the slide can be effectively restored, and the accuracy of effect restoration is improved.
Example one
Referring to fig. 1, a method for restoring a linear gradual change of a background title shadow in PPTX includes the following steps:
s1, reading an XML file in the PPTX compression format file;
specifically, the content of a specified file in the PPTX compression format file is decompressed through a zlib function library, and an XML file in the content of the specified file is read through an RAPIDxml analysis library;
s2, traversing the node content in the XML file, and determining a slide set by the background title shadow linear gradual effect;
specifically, the step S2 includes:
traversing all files representing slide page number contents in the XML file, respectively judging whether a node representing the setting of the background title shadow linear gradual change effect exists in each slide page number content file, if so, executing the step S3, and if not, not processing.
Specifically, a file directory of a PPTX compressed format file after decompression is obtained, all slide page number content file slide #. XML represented in a slides directory under a ppt directory in the directory are searched, p: bg nodes under the XML file are traversed, and when the property value of the slide ToTitle under the node is 1, and the property value of the sub-node a, the sub-node a of the gradFill, the path of the path is 'shape' or no a: path node, it is judged that a slide corresponding to the current slide #. XML file has a background title shadow linear gradual change effect.
S3, analyzing the page number of the slide, the gradient color information of the corresponding title and the position of the title according to the slide set by the background title shadow linear gradient effect;
specifically, the step S3 includes:
analyzing the child nodes under the nodes for representing the setting of the background title shadow linear gradient effect, and acquiring gradient color information of the title and position information of the title under the current slide;
and acquiring the page number of the current slide, and storing the page number of the slide, the gradient color information of the title corresponding to the page number of the slide and the position of the title in an array in a JSON data format.
Specifically, the a: gs nodes in the a: gsLst nodes under the a: gradFill nodes are analyzed one by one according to the sequence, pos attributes in the a: gs nodes represent title gradient position information, if the title of the slide has gradient colors of X positions, X a: gs nodes must exist, the gradient position information needs to be converted by dividing by 1000, a: schemeClr nodes or a: srgbClr nodes may exist under the a: gs nodes, wherein the a: schemeClr nodes represent that the background title shadow linear gradient color value set by the user is in the color value range defined by the master or the slide theme, the a: srgbClr nodes represent that the background title shadow linear gradient color value is user-defined, when the a: gss nodes are the a: schemeClr nodes, the nodes have value attributes representing color values under the nodes, the value attributes are analyzed, the value attributes are assumed to be the percent, and the reference parameter # needs to be used as a corresponding color value in the search file #, firstly, obtaining a slide layout # file under a slide layout # and xml of a corresponding page number, obtaining a Target attribute value under a Relationship node in the file, searching a slide manager # and xml file under a slide manager # and xml of a master file corresponding to a path according to a relative path provided by the attribute value, obtaining a corresponding the me # and xml file based on the Target attribute value in the Relationship node under the file, wherein the file represents subject content in a slide in a same-level directory of the slide file, an ace # node corresponds to an ace # in the me # file, a color value expressed under the ace # node is a color value designated by ace #, and a child node of the ace # also contains a color value of an srgbcr node, and when the child node of the ace # is a sixteenth attribute value, the color value is directly expressed by the color value of the srgbcr node. After the color values are analyzed, nodes a: lumMod, a: lumOff and a: srgbClr may exist under nodes a: schemclr and a: srgbClr, wherein attribute values under the nodes are divided by 100000 to respectively represent a brightness modification value, a brightness offset value and a transparency value, and an actual gradient color value in a background title shadow linear gradient effect presented in the PPT needs to be processed by setting the brightness modification value, the brightness offset value and the transparency value, wherein when the brightness modification value and the brightness offset value are set, a color space needs to be converted into an HSL color space and then converted into an ARGB color space after being processed by a conventional algorithm, the transparency modification can be directly performed in the ARGB space, and the processed gradient color value is gradient color information of the analyzed current slide title.
And (3) a p: nvSpPr node exists in a p: sp node under the slide # xml of the current slide page number content file, an attribute type exists in a p: ph subnode of the subnode p: nvPr, when the type value is ctrTitle or title, the current slide is indicated to have a title, otherwise, the slide is judged not to have a title, and the default title position without the title is taken as the central point. When the slide has a title, analyzing a peer node p: spPr of a p: nvspPr node, judging whether content exists under the node, if so, analyzing an x attribute value and a y attribute value in an off node a: xfrm under a child node a: xfrm, wherein the x attribute value and the y attribute value need to be divided by 360000 to be converted into a coordinate position (x, y) of an upper left corner point of the title, the unit is cm, simultaneously analyzing a cx attribute and a cy attribute under an ext node, the cx attribute and the cy attribute need to be divided by 360000 to be converted into a width value of the title, the unit is cm, using the x, y, cx and cy attribute values as position information of the title, if no content exists under the p: spPr node, searching a Target attribute value of a relashionship node under a slide #, xml, reils file corresponding to the page number, and acquiring a corresponding slide layout # layout file according to a relative path provided by the attribute values, traversing the page layout file, judging whether the type attribute value of the p: ph node in the p: nvSpPr node in the file corresponds to the type attribute value read in the slide # xml file, if so, analyzing the x, y, cx and cy attribute values as the position information of the title according to the same node rule, if the content exists in the p: spPr node but the attribute value related to the position information of the title does not exist, searching the slidaster # xml master version file corresponding to the Target attribute value in the slide layout #, xml files, traversing the master version file, judging whether the type attribute value of the p: nvSpPr node in the file corresponds to the type attribute value read in the slide # xml file, if so, analyzing the type attribute value of the p: ph node in the nvPr node in the p: sp node in the file according to the same rule, cx, cy attribute values as position information of the title.
Because # in slide page number content file slide #. xml represents specific page number, the page number is obtained, the page number of the current slide, the gradient color information of the title and the position information of the title are stored in an array in a JSON data format, wherein one page number corresponds to one background, namely one gradient color information and one position information of the title.
Specifically, the step S4 includes:
and according to the page number of the transferred slide, the gradient color information of the title corresponding to the page number of the transferred slide and the position of the title, creating a canvas with the same proportion as the slide by using a linear gradient brush in a drawing library, performing gradient drawing of five areas, and generating a background picture with the same linear gradient effect as the background title shadow corresponding to the slide.
Specifically, a JSON array for storing the page number of the slide, the gradient color information of the title corresponding to the page number and the position of the title is obtained, rendering and drawing of a generated picture are performed according to transmitted data, in the same project, a canvas with the same proportion as that of a PowerPoint slide is created by using a linear gradient brush in a Microsoft GDI + drawing library, gradient drawing is performed on the upper region, the lower region, the left region, the right region and the central region of the canvas, the drawn picture is stored, and accurate reduction of the background title shadow linear gradient effect of the slide in the PPTX file is achieved, as shown in a gradient drawing schematic diagram of FIG. 3.
Specifically, the performing of the gradient drawing of the five regions in step S4 includes:
and drawing the shapes of the five areas in the canvas by using functions of drawing polygons and drawing rectangles.
Specifically, the shape drawing is carried out on the upper, lower, left, right and central areas of the canvas, and the main steps of drawing the graph are as follows:
generating a canvas with the same slide scale by using GDI +;
setting the quality of drawing of the graph, such as high definition, common definition and the like;
creating a linear gradient brush for drawing the graph;
dividing left, upper, right, lower and central areas in the canvas according to the coordinates of the upper left corner point of the title and the width and height of the title, filling the interior of a polygon defined by a specified point array by using a linear gradient brush according to gradient color information of the title in the five areas, and generating a drawn picture according to the set drawing quality of the graph.
Example two
Referring to fig. 2, a terminal 1 for restoring a linear gradual change of a background title shade in PPTX includes a memory 2, a processor 3, and a computer program stored in the memory 2 and executable on the processor 3, where the processor 3 implements the steps in the first embodiment when executing the computer program.
In summary, the method and the terminal for restoring the linear gradual change of the background title shade in the PPTX provided by the present invention, through reading the XML file under the PPTX compression format file by zlib and RAPIDxml tools, enable the user to conveniently parse the node content under the XML file to obtain the linear gradual change effect data of the background title shade set in the slide, traverse all the files representing the page number content of the slide under the XML file, because the traversal of a large number of files and nodes is involved when parsing the linear gradual change effect data of the background title shade of the slide, first determine whether the node representing the linear gradual change effect of the background title shade exists in the page number content file of the slide, can effectively save the parsing time of the linear gradual change effect of the background title shade in the PPTX file, improve the parsing efficiency, by parsing the color information and the position information of the slide title, the drawing library can simulate the linear gradient effect of the background title shadow in the PowerPoint by using the data, the page number of the slide, the gradient color information and the position information of the title are stored into the JSON array together, the targeted reduction of the title effect in the slide is facilitated, the confusion of the setting parameters of the linear gradient effect of the background title shadow is avoided, the drawing library is used for drawing a canvas with the same proportion as the slide, the targeted gradient drawing is carried out in a divided area on the canvas, the background picture with the same setting effect as the parameters is generated, the problem that the picture with the linear gradient effect of the background title shadow of the slide in the PPTX file can be derived under the condition that a PowerPoint program cannot be used is effectively solved, and the accurate reduction of the linear gradient effect of the background title shadow in the PPTX file is realized.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to the related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for restoring linear gradual change of background title shadows in PPTX is characterized by comprising the following steps:
s1, reading an XML file in the PPTX compression format file;
s2, traversing the node content in the XML file, and determining a slide set by the background title shadow linear gradual effect;
s3, analyzing the page number of the slide, the gradient color information of the corresponding title and the position of the title according to the slide set by the background title shadow linear gradient effect;
and S4, generating a background picture with the same background title shadow linear gradient effect according to the page number of the slide, the gradient color information of the title corresponding to the slide and the position of the title.
2. The method as claimed in claim 1, wherein the step S2 includes:
traversing all files representing slide page number contents in the XML file, respectively judging whether a node representing the setting of the background title shadow linear gradual change effect exists in each slide page number content file, if so, executing the step S3, and if not, not processing.
3. The method as claimed in claim 2, wherein the step S3 includes:
analyzing the child nodes under the nodes for representing the setting of the background title shadow linear gradient effect, and acquiring gradient color information of the title and position information of the title under the current slide;
and acquiring the page number of the current slide, and storing the page number of the slide, the gradient color information of the title corresponding to the page number of the slide and the position of the title in an array in a JSON data format.
4. The method as claimed in claim 1, wherein the step S4 includes:
and according to the page number of the transferred slide, the gradient color information of the title corresponding to the page number of the transferred slide and the position of the title, creating a canvas with the same proportion as the slide by using a linear gradient brush in a drawing library, performing gradient drawing of five areas, and generating a background picture with the same linear gradient effect as the background title shadow corresponding to the slide.
5. The method as claimed in claim 4, wherein said performing a gradual drawing of five regions in step S4 includes:
and drawing the shapes of the five areas in the canvas by using functions of drawing polygons and drawing rectangles.
6. A terminal for restoring linear gradual change of background title shade in PPTX, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the following steps:
s1, reading an XML file in the PPTX compression format file;
s2, traversing the node content in the XML file, and determining a slide set by the background title shadow linear gradual effect;
s3, analyzing the page number of the slide, the gradient color information of the corresponding title and the position of the title according to the slide set by the background title shadow linear gradient effect;
and S4, generating a background picture with the same background title shadow linear gradient effect according to the page number of the slide, the gradient color information of the title corresponding to the slide and the position of the title.
7. The terminal for restoring a linear gradual change of background title shading in PPTX as claimed in claim 6, wherein said step S2 comprises:
traversing all files representing slide page number contents in the XML file, respectively judging whether a node representing the setting of the background title shadow linear gradual change effect exists in each slide page number content file, if so, executing the step S3, and if not, not processing.
8. The terminal for restoring a linear gradual change of background title shading in PPTX as claimed in claim 7, wherein said step S3 comprises:
analyzing the child nodes under the nodes for representing the setting of the background title shadow linear gradient effect, and acquiring gradient color information of the title and position information of the title under the current slide;
and acquiring the page number of the current slide, and storing the page number of the slide, the gradient color information of the title corresponding to the page number of the slide and the position of the title in an array in a JSON data format.
9. The terminal for restoring a linear gradual change of background title shading in PPTX as claimed in claim 6, wherein said step S4 comprises:
and according to the page number of the transferred slide, the gradient color information of the title corresponding to the page number of the transferred slide and the position of the title, creating a canvas with the same proportion as the slide by using a linear gradient brush in a drawing library, performing gradient drawing of five areas, and generating a background picture with the same linear gradient effect as the background title shadow corresponding to the slide.
10. The terminal for restoring PPTX linear gradual change of background title shading as claimed in claim 9, wherein said performing gradual drawing of five regions in step S4 comprises:
and drawing the shapes of the five areas in the canvas by using functions of drawing polygons and drawing rectangles.
CN201911321691.4A 2019-12-20 2019-12-20 Method and terminal for restoring linear gradual change of background title shadows in PPTX Active CN111192336B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911321691.4A CN111192336B (en) 2019-12-20 2019-12-20 Method and terminal for restoring linear gradual change of background title shadows in PPTX

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911321691.4A CN111192336B (en) 2019-12-20 2019-12-20 Method and terminal for restoring linear gradual change of background title shadows in PPTX

Publications (2)

Publication Number Publication Date
CN111192336A true CN111192336A (en) 2020-05-22
CN111192336B CN111192336B (en) 2023-04-28

Family

ID=70707444

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911321691.4A Active CN111192336B (en) 2019-12-20 2019-12-20 Method and terminal for restoring linear gradual change of background title shadows in PPTX

Country Status (1)

Country Link
CN (1) CN111192336B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113822022A (en) * 2020-06-18 2021-12-21 苏州谦问万答吧教育科技有限公司 PPT (Power Point) auditing processing method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103823676A (en) * 2014-02-14 2014-05-28 珠海市君天电子科技有限公司 Display control method, display control device and client side
CN105022749A (en) * 2014-04-28 2015-11-04 上海未达数码科技有限公司 Document presentation realization method based on Android platform
US20170315697A1 (en) * 2016-04-27 2017-11-02 Crestron Electronics, Inc. Three-dimensional building management system visualization
CN109634575A (en) * 2018-12-24 2019-04-16 安徽经邦软件技术有限公司 Intelligence generates PPT analysis report method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103823676A (en) * 2014-02-14 2014-05-28 珠海市君天电子科技有限公司 Display control method, display control device and client side
CN105022749A (en) * 2014-04-28 2015-11-04 上海未达数码科技有限公司 Document presentation realization method based on Android platform
US20170315697A1 (en) * 2016-04-27 2017-11-02 Crestron Electronics, Inc. Three-dimensional building management system visualization
CN109634575A (en) * 2018-12-24 2019-04-16 安徽经邦软件技术有限公司 Intelligence generates PPT analysis report method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
曾柏羲 等: "基于B/S结构的多终端交互式幻灯片演示系统", 《现代电子技术》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113822022A (en) * 2020-06-18 2021-12-21 苏州谦问万答吧教育科技有限公司 PPT (Power Point) auditing processing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN111192336B (en) 2023-04-28

Similar Documents

Publication Publication Date Title
JP4413844B2 (en) Image display control device
Schön et al. Octree-based indexing for 3D pointclouds within an Oracle Spatial DBMS
CN115439609B (en) Three-dimensional model rendering method, system, equipment and medium based on map service
CN114494024B (en) Image rendering method, device and equipment and storage medium
US6853374B2 (en) Image space display method and apparatus
US9734606B2 (en) Program information display system and method displaying program structure information including interval information
US20090307200A1 (en) System and Method For Providing Suppression of Zero, Null, Overflow, and Divide by Zero Values in Sparse Query Results
CN111192336A (en) Method and terminal for restoring linear gradual change of background title shadows in PPTX
JP6863675B2 (en) Image split
CN116524104B (en) Rendering data processing method, device, equipment and storage medium
US20220180597A1 (en) Image processing apparatus, image processing method, and program
CN110853122B (en) Animation generation method, device and storage medium
CN107767434B (en) Method for acquiring texture mapping configuration information in virtual reality technology and storage medium
CN110647377A (en) Picture processing system, device and medium for human-computer interaction interface
CN113379814B (en) Three-dimensional space relation judging method and device
CN116304189A (en) Image extraction method in excel file and electronic equipment
Mateo et al. Hierarchical, Dense and Dynamic 3D Reconstruction Based on VDB Data Structure for Robotic Manipulation Tasks
CN115691772A (en) Operation visualization system and corresponding computer device and storage medium
CN114259730A (en) High-efficiency export method, system and medium for Cocos preform
CN108037870B (en) Touch screen-based three-dimensional scene object picking method and terminal
US10282376B2 (en) Semi-structured spatial data conversion
CN111158564B (en) Method and terminal for restoring picture clipping effect in PowerPoint
CN111080745B (en) Method and terminal for re-coloring pictures in PowerPoint
CN111127306B (en) Method and terminal for restoring transparency of picture in PPTX file
CN114090523B (en) Electronic device, and node parsing method and medium for XML file thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant