Article 29 of the Patent Law stipulates that the administrative department for patent in the State Council may, when it deems it necessary, require the applicant for a patent for design to submit samples or models of products using the design. The volume of the sample or model shall not exceed 30cm× 30cm× 30cm, and the weight shall not exceed 15kg. Perishable, fragile or dangerous goods shall not be submitted as samples or models.
It can be seen that the cake itself cannot apply for a patent for design.
However, if you want to use registered patterns as cake patterns, such as cartoon images, it will involve the issue of patent ownership. If you want to use it, you can do appropriate treatment and improvement, which is different from the original picture.