Skip to content

Conversation

@kherinwork
Copy link
Contributor

No description provided.

@kherinwork kherinwork changed the title Image text overlay DO NOT MERGE: Image text overlay Aug 17, 2017
@@ -0,0 +1,23 @@
public class ImageTextOverlay {
private sharinpix.Utils utils;
public ImageTextOverlay(){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spaces

}
public String overlayText(String imageId, String text, String fontStyle, String fontSize, String fontEmphasis, String gravity, String borderWidth, String borderStyle, String borderColor){
String sanitizedText = EncodingUtil.urlEncode(text, 'UTF-8').replaceAll('\\+', '%20').replaceAll('%2C', '%252C');
String overlay = 'text:'+fontStyle+'_'+fontSize+'_'+fontEmphasis+'_stroke:'+sanitizedText+',bo_'+borderWidth+'px_'+borderStyle+'_'+borderColor;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to align = and =>... will have problems when adding more assignment statements

'Id' => albumId
});
}
/**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space

@RemoteAction
global static String overlayText(String imageId, String text, String options){
map<string, object> optionsMap = (map<string, object>) JSON.deserializeUntyped(options);
String fontStyle = (String) optionsMap.get('fontStyle');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to align

* @param options [JSON string with more image transformation options]
* @return [image URL of image with overlaid text]
*/
@RemoteAction
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation

@@ -0,0 +1,5 @@

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no beginning space in xml

var fontSize = document.getElementById("fontSizeInput").value;
var fontEmphasis = document.getElementById("fontEmphasisInput").value;
var gravity = document.getElementById("gravityInput").value;
var borderWidth = document.getElementById("borderWidthInput").value;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation - using tabs

}
}
);
}//end cropFace
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments

global class ImageTextOverlayController {
global String parameters {set;get;}
public Id albumId;
public ImageTextOverlayController(ApexPages.standardController controller){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants