More work on getting images to display in diff

This commit is contained in:
Kovid Goyal
2023-03-26 21:57:30 +05:30
parent cece795b16
commit d66da811db
5 changed files with 394 additions and 21 deletions

View File

@@ -497,7 +497,11 @@ func (self *GraphicsCommand) serialize_non_default_fields() (ans []string) {
}
func (self GraphicsCommand) String() string {
return "GraphicsCommand(" + strings.Join(self.serialize_non_default_fields(), ", ") + ")"
ans := "GraphicsCommand(" + strings.Join(self.serialize_non_default_fields(), ", ")
if self.response_message != "" {
ans += fmt.Sprintf(", response=%#v", self.response_message)
}
return ans + ")"
}
func (self *GraphicsCommand) serialize_to(buf io.StringWriter, chunk string) (err error) {
@@ -921,15 +925,6 @@ func (self *GraphicsCommand) SetTopEdge(y uint64) *GraphicsCommand {
return self
}
func (self *GraphicsCommand) SourceLeftEdge() uint64 {
return self.X
}
func (self *GraphicsCommand) SetSourceLeftEdge(x uint64) *GraphicsCommand {
self.X = x
return self
}
func (self *GraphicsCommand) XOffset() uint64 {
return self.X
}