It was so, and it is still so - art is always on duty for political movements. The ways of propaganda changed from beautiful glorious paintings to posters, but idea is still the same- to show the greatness and the power.
Louis XIV spent many hours of his life posing for the painters. The idea of it was not only to have many images of himself, but make him to be "everywhere"- in all rooms of his palaces, on the street (as statues) and so on. That was the meaning of common portraits.
The second kind of paintings were made to capture great moments in history, such as victory, birth of a dauphin ...
The third kind of paintings were all possible mythological themes where Louis XIV (not only he, but all kings in all times) was painted as a mythological hero, or together with greatest people in world history. The idea of such paintings was to pass the glory and glamour of himself and his century to the next generations. Paintings of that kind can be found everywhere in Versailles (in Gallery of Mirrors, for example) and other palaces. Usually they were made to decorate ceilings in appartments of the king.